| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_VIEW_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_VIEW_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_VIEW_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_VIEW_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "chrome/browser/chromeos/login/login_html_dialog.h" | 9 #include "chrome/browser/chromeos/login/login_html_dialog.h" |
| 10 #include "chrome/browser/chromeos/status/status_area_host.h" | 10 #include "chrome/browser/chromeos/status/status_area_host.h" |
| 11 #include "views/view.h" | 11 #include "views/view.h" |
| 12 | 12 |
| 13 class DOMView; | 13 class DOMView; |
| 14 class GURL; | 14 class GURL; |
| 15 class Profile; | 15 class Profile; |
| 16 class WebUI; |
| 16 | 17 |
| 17 namespace views { | 18 namespace views { |
| 18 class Widget; | 19 class Widget; |
| 19 class WindowDelegate; | 20 class WindowDelegate; |
| 20 } | 21 } |
| 21 | 22 |
| 22 namespace chromeos { | 23 namespace chromeos { |
| 23 | 24 |
| 24 class StatusAreaView; | 25 class StatusAreaView; |
| 25 | 26 |
| 26 // View used to render a WebUI supporting Widget. This widget is used for the | 27 // View used to render a WebUI supporting Widget. This widget is used for the |
| 27 // WebUI based start up and lock screens. It contains a StatusAreaView and | 28 // WebUI based start up and lock screens. It contains a StatusAreaView and |
| 28 // DOMView. | 29 // DOMView. |
| 29 class WebUILoginView : public views::View, | 30 class WebUILoginView : public views::View, |
| 30 public StatusAreaHost, | 31 public StatusAreaHost, |
| 31 public chromeos::LoginHtmlDialog::Delegate { | 32 public chromeos::LoginHtmlDialog::Delegate { |
| 32 public: | 33 public: |
| 33 WebUILoginView(); | 34 WebUILoginView(); |
| 34 virtual ~WebUILoginView(); | 35 virtual ~WebUILoginView(); |
| 35 | 36 |
| 36 // Initializes the webui login view. |login_url| must be specified. | 37 // Initializes the webui login view. |
| 37 virtual void Init(const GURL& login_url); | 38 virtual void Init(); |
| 38 | 39 |
| 39 // Overriden from views::Views: | 40 // Overridden from views::Views: |
| 40 virtual std::string GetClassName() const OVERRIDE; | 41 virtual std::string GetClassName() const OVERRIDE; |
| 41 | 42 |
| 42 // Overridden from StatusAreaHost: | 43 // Overridden from StatusAreaHost: |
| 43 virtual gfx::NativeWindow GetNativeWindow() const; | 44 virtual gfx::NativeWindow GetNativeWindow() const; |
| 44 | 45 |
| 45 // Invokes SetWindowType for the window. This is invoked during startup and | 46 // Invokes SetWindowType for the window. This is invoked during startup and |
| 46 // after we've painted. | 47 // after we've painted. |
| 47 void UpdateWindowType(); | 48 void UpdateWindowType(); |
| 48 | 49 |
| 50 // Loads given page. Should be called after Init() has been called. |
| 51 void LoadURL(const GURL& url); |
| 52 |
| 53 // Returns current WebUI. |
| 54 WebUI* GetWebUI(); |
| 55 |
| 49 protected: | 56 protected: |
| 50 // Overridden from views::View: | 57 // Overridden from views::View: |
| 51 virtual void Layout() OVERRIDE; | 58 virtual void Layout() OVERRIDE; |
| 52 virtual void ChildPreferredSizeChanged(View* child) OVERRIDE; | 59 virtual void ChildPreferredSizeChanged(View* child) OVERRIDE; |
| 53 | 60 |
| 54 // Overridden from StatusAreaHost: | 61 // Overridden from StatusAreaHost: |
| 55 virtual Profile* GetProfile() const OVERRIDE; | 62 virtual Profile* GetProfile() const OVERRIDE; |
| 56 virtual void ExecuteBrowserCommand(int id) const OVERRIDE; | 63 virtual void ExecuteBrowserCommand(int id) const OVERRIDE; |
| 57 virtual bool ShouldOpenButtonOptions( | 64 virtual bool ShouldOpenButtonOptions( |
| 58 const views::View* button_view) const OVERRIDE; | 65 const views::View* button_view) const OVERRIDE; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 75 // Proxy settings dialog that can be invoked from network menu. | 82 // Proxy settings dialog that can be invoked from network menu. |
| 76 scoped_ptr<LoginHtmlDialog> proxy_settings_dialog_; | 83 scoped_ptr<LoginHtmlDialog> proxy_settings_dialog_; |
| 77 | 84 |
| 78 private: | 85 private: |
| 79 DISALLOW_COPY_AND_ASSIGN(WebUILoginView); | 86 DISALLOW_COPY_AND_ASSIGN(WebUILoginView); |
| 80 }; | 87 }; |
| 81 | 88 |
| 82 } // namespace chromeos | 89 } // namespace chromeos |
| 83 | 90 |
| 84 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_VIEW_H_ | 91 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_VIEW_H_ |
| OLD | NEW |