blob: 1a8b34e96bf36d1016ff07c9e8e809770e13a2ca [file] [log] [blame]
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_CAPTIVE_PORTAL_VIEW_H_
#define CHROME_BROWSER_CHROMEOS_LOGIN_CAPTIVE_PORTAL_VIEW_H_
#include <string>
#include "chrome/browser/chromeos/login/simple_web_view_dialog.h"
namespace chromeos {
class CaptivePortalWindowProxy;
class CaptivePortalView : public SimpleWebViewDialog {
public:
CaptivePortalView(Profile* profile, CaptivePortalWindowProxy* proxy);
virtual ~CaptivePortalView();
// Starts loading.
void StartLoad();
// Overridden from views::WidgetDelegate:
virtual bool CanResize() const OVERRIDE;
virtual ui::ModalType GetModalType() const OVERRIDE;
virtual base::string16 GetWindowTitle() const OVERRIDE;
virtual bool ShouldShowWindowTitle() const OVERRIDE;
virtual views::NonClientFrameView* CreateNonClientFrameView(
views::Widget* widget) OVERRIDE;
// Overridden from content::WebContentsDelegate:
virtual void NavigationStateChanged(const content::WebContents* source,
unsigned changed_flags) OVERRIDE;
virtual void LoadingStateChanged(content::WebContents* source) OVERRIDE;
private:
// Contains CaptivePortalWindowProxy to be notified when redirection state is
// resolved.
CaptivePortalWindowProxy* proxy_;
bool redirected_;
DISALLOW_COPY_AND_ASSIGN(CaptivePortalView);
};
} // namespace chromeos
#endif // CHROME_BROWSER_CHROMEOS_LOGIN_CAPTIVE_PORTAL_VIEW_H_