1// Copyright 2014 The Chromium Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_UI_CAPTIVE_PORTAL_VIEW_H_ 6#define CHROME_BROWSER_CHROMEOS_LOGIN_UI_CAPTIVE_PORTAL_VIEW_H_ 7 8#include <string> 9#include "chrome/browser/chromeos/login/ui/simple_web_view_dialog.h" 10 11namespace chromeos { 12 13class CaptivePortalWindowProxy; 14 15class CaptivePortalView : public SimpleWebViewDialog { 16 public: 17 CaptivePortalView(Profile* profile, CaptivePortalWindowProxy* proxy); 18 virtual ~CaptivePortalView(); 19 20 // Starts loading. 21 void StartLoad(); 22 23 // Overridden from views::WidgetDelegate: 24 virtual bool CanResize() const OVERRIDE; 25 virtual ui::ModalType GetModalType() const OVERRIDE; 26 virtual base::string16 GetWindowTitle() const OVERRIDE; 27 virtual bool ShouldShowWindowTitle() const OVERRIDE; 28 virtual views::NonClientFrameView* CreateNonClientFrameView( 29 views::Widget* widget) OVERRIDE; 30 31 // Overridden from content::WebContentsDelegate: 32 virtual void NavigationStateChanged( 33 const content::WebContents* source, 34 content::InvalidateTypes changed_flags) OVERRIDE; 35 virtual void LoadingStateChanged(content::WebContents* source, 36 bool to_different_document) OVERRIDE; 37 38 private: 39 // Contains CaptivePortalWindowProxy to be notified when redirection state is 40 // resolved. 41 CaptivePortalWindowProxy* proxy_; 42 43 bool redirected_; 44 45 DISALLOW_COPY_AND_ASSIGN(CaptivePortalView); 46}; 47 48} // namespace chromeos 49 50#endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_CAPTIVE_PORTAL_VIEW_H_ 51