| 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 <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 namespace chromeos { | 28 namespace chromeos { |
| 29 | 29 |
| 30 class StatusAreaViewChromeos; | 30 class StatusAreaViewChromeos; |
| 31 | 31 |
| 32 // View used to render a WebUI supporting Widget. This widget is used for the | 32 // View used to render a WebUI supporting Widget. This widget is used for the |
| 33 // WebUI based start up and lock screens. It contains a StatusAreaView and | 33 // WebUI based start up and lock screens. It contains a StatusAreaView and |
| 34 // DOMView. | 34 // DOMView. |
| 35 class WebUILoginView : public views::WidgetDelegateView, | 35 class WebUILoginView : public views::WidgetDelegateView, |
| 36 public StatusAreaButton::Delegate, | 36 public StatusAreaButton::Delegate, |
| 37 public TabContentsDelegate, | 37 public TabContentsDelegate, |
| 38 public LoginHtmlDialog::Delegate, | |
| 39 public TabFirstRenderWatcher::Delegate { | 38 public TabFirstRenderWatcher::Delegate { |
| 40 public: | 39 public: |
| 41 static const int kStatusAreaCornerPadding; | 40 static const int kStatusAreaCornerPadding; |
| 42 | 41 |
| 43 WebUILoginView(); | 42 WebUILoginView(); |
| 44 virtual ~WebUILoginView(); | 43 virtual ~WebUILoginView(); |
| 45 | 44 |
| 46 // Initializes the webui login view. | 45 // Initializes the webui login view. |
| 47 virtual void Init(views::Widget* login_window); | 46 virtual void Init(views::Widget* login_window); |
| 48 | 47 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 69 | 68 |
| 70 // Toggles whether status area is enabled. | 69 // Toggles whether status area is enabled. |
| 71 void SetStatusAreaEnabled(bool enable); | 70 void SetStatusAreaEnabled(bool enable); |
| 72 | 71 |
| 73 // Toggles status area visibility. | 72 // Toggles status area visibility. |
| 74 void SetStatusAreaVisible(bool visible); | 73 void SetStatusAreaVisible(bool visible); |
| 75 | 74 |
| 76 protected: | 75 protected: |
| 77 // Overridden from views::View: | 76 // Overridden from views::View: |
| 78 virtual void Layout() OVERRIDE; | 77 virtual void Layout() OVERRIDE; |
| 78 virtual void OnLocaleChanged() OVERRIDE; |
| 79 virtual void ChildPreferredSizeChanged(View* child) OVERRIDE; | 79 virtual void ChildPreferredSizeChanged(View* child) OVERRIDE; |
| 80 | 80 |
| 81 // Overridden from StatusAreaButton::Delegate: | 81 // Overridden from StatusAreaButton::Delegate: |
| 82 virtual bool ShouldExecuteStatusAreaCommand( | 82 virtual bool ShouldExecuteStatusAreaCommand( |
| 83 const views::View* button_view, int command_id) const OVERRIDE; | 83 const views::View* button_view, int command_id) const OVERRIDE; |
| 84 virtual void ExecuteStatusAreaCommand( | 84 virtual void ExecuteStatusAreaCommand( |
| 85 const views::View* button_view, int command_id) OVERRIDE; | 85 const views::View* button_view, int command_id) OVERRIDE; |
| 86 virtual gfx::Font GetStatusAreaFont(const gfx::Font& font) const OVERRIDE; | 86 virtual gfx::Font GetStatusAreaFont(const gfx::Font& font) const OVERRIDE; |
| 87 virtual StatusAreaButton::TextStyle GetStatusAreaTextStyle() const OVERRIDE; | 87 virtual StatusAreaButton::TextStyle GetStatusAreaTextStyle() const OVERRIDE; |
| 88 virtual void ButtonVisibilityChanged(views::View* button_view) OVERRIDE; | 88 virtual void ButtonVisibilityChanged(views::View* button_view) OVERRIDE; |
| 89 | 89 |
| 90 // Overridden from LoginHtmlDialog::Delegate: | |
| 91 virtual void OnDialogClosed() OVERRIDE; | |
| 92 virtual void OnLocaleChanged() OVERRIDE; | |
| 93 | |
| 94 // TabFirstRenderWatcher::Delegate implementation. | 90 // TabFirstRenderWatcher::Delegate implementation. |
| 95 virtual void OnRenderHostCreated(RenderViewHost* host) OVERRIDE; | 91 virtual void OnRenderHostCreated(RenderViewHost* host) OVERRIDE; |
| 96 virtual void OnTabMainFrameLoaded() OVERRIDE; | 92 virtual void OnTabMainFrameLoaded() OVERRIDE; |
| 97 virtual void OnTabMainFrameFirstRender() OVERRIDE; | 93 virtual void OnTabMainFrameFirstRender() OVERRIDE; |
| 98 | 94 |
| 99 // Creates and adds the status area (separate window). | 95 // Creates and adds the status area (separate window). |
| 100 virtual void InitStatusArea(); | 96 virtual void InitStatusArea(); |
| 101 | 97 |
| 102 StatusAreaViewChromeos* status_area_; | 98 StatusAreaViewChromeos* status_area_; |
| 103 | 99 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 | 140 |
| 145 // Caches StatusArea visibility setting before it has been initialized. | 141 // Caches StatusArea visibility setting before it has been initialized. |
| 146 bool status_area_visibility_on_init_; | 142 bool status_area_visibility_on_init_; |
| 147 | 143 |
| 148 DISALLOW_COPY_AND_ASSIGN(WebUILoginView); | 144 DISALLOW_COPY_AND_ASSIGN(WebUILoginView); |
| 149 }; | 145 }; |
| 150 | 146 |
| 151 } // namespace chromeos | 147 } // namespace chromeos |
| 152 | 148 |
| 153 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_VIEW_H_ | 149 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_VIEW_H_ |
| OLD | NEW |