| 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 "chrome/browser/chromeos/tab_first_render_watcher.h" |
| 11 #include "chrome/browser/ui/views/unhandled_keyboard_event_handler.h" | 12 #include "chrome/browser/ui/views/unhandled_keyboard_event_handler.h" |
| 12 #include "content/browser/tab_contents/tab_contents_delegate.h" | 13 #include "content/browser/tab_contents/tab_contents_delegate.h" |
| 13 #include "views/view.h" | 14 #include "views/view.h" |
| 14 | 15 |
| 15 class DOMView; | 16 class DOMView; |
| 16 class GURL; | 17 class GURL; |
| 17 class Profile; | 18 class Profile; |
| 18 class WebUI; | 19 class WebUI; |
| 19 | 20 |
| 20 namespace views { | 21 namespace views { |
| 21 class Widget; | 22 class Widget; |
| 22 } | 23 } |
| 23 | 24 |
| 24 namespace chromeos { | 25 namespace chromeos { |
| 25 | 26 |
| 26 class StatusAreaView; | 27 class StatusAreaView; |
| 28 class TabFirstRenderWatcher; |
| 27 | 29 |
| 28 // View used to render a WebUI supporting Widget. This widget is used for the | 30 // View used to render a WebUI supporting Widget. This widget is used for the |
| 29 // WebUI based start up and lock screens. It contains a StatusAreaView and | 31 // WebUI based start up and lock screens. It contains a StatusAreaView and |
| 30 // DOMView. | 32 // DOMView. |
| 31 class WebUILoginView : public views::View, | 33 class WebUILoginView : public views::View, |
| 32 public StatusAreaHost, | 34 public StatusAreaHost, |
| 33 public TabContentsDelegate, | 35 public TabContentsDelegate, |
| 34 public chromeos::LoginHtmlDialog::Delegate { | 36 public chromeos::LoginHtmlDialog::Delegate, |
| 37 public TabFirstRenderWatcher::Delegate { |
| 35 public: | 38 public: |
| 36 static const int kStatusAreaCornerPadding; | 39 static const int kStatusAreaCornerPadding; |
| 37 | 40 |
| 38 WebUILoginView(); | 41 WebUILoginView(); |
| 39 virtual ~WebUILoginView(); | 42 virtual ~WebUILoginView(); |
| 40 | 43 |
| 41 // Initializes the webui login view. | 44 // Initializes the webui login view. |
| 42 virtual void Init(); | 45 virtual void Init(); |
| 43 | 46 |
| 44 // Overridden from views::Views: | 47 // Overridden from views::Views: |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 const views::View* button_view) const OVERRIDE; | 83 const views::View* button_view) const OVERRIDE; |
| 81 virtual void OpenButtonOptions(const views::View* button_view) OVERRIDE; | 84 virtual void OpenButtonOptions(const views::View* button_view) OVERRIDE; |
| 82 virtual ScreenMode GetScreenMode() const OVERRIDE; | 85 virtual ScreenMode GetScreenMode() const OVERRIDE; |
| 83 virtual TextStyle GetTextStyle() const OVERRIDE; | 86 virtual TextStyle GetTextStyle() const OVERRIDE; |
| 84 virtual void ButtonVisibilityChanged(views::View* button_view) OVERRIDE; | 87 virtual void ButtonVisibilityChanged(views::View* button_view) OVERRIDE; |
| 85 | 88 |
| 86 // Overridden from LoginHtmlDialog::Delegate: | 89 // Overridden from LoginHtmlDialog::Delegate: |
| 87 virtual void OnDialogClosed() OVERRIDE; | 90 virtual void OnDialogClosed() OVERRIDE; |
| 88 virtual void OnLocaleChanged() OVERRIDE; | 91 virtual void OnLocaleChanged() OVERRIDE; |
| 89 | 92 |
| 93 // TabFirstRenderWatcher::Delegate implementation. |
| 94 virtual void OnTabMainFrameLoaded() OVERRIDE; |
| 95 virtual void OnTabMainFrameFirstRender() OVERRIDE; |
| 96 |
| 90 // Creates and adds the status area (separate window). | 97 // Creates and adds the status area (separate window). |
| 91 virtual void InitStatusArea(); | 98 virtual void InitStatusArea(); |
| 92 | 99 |
| 93 StatusAreaView* status_area_; | 100 StatusAreaView* status_area_; |
| 94 | 101 |
| 95 Profile* profile_; | 102 Profile* profile_; |
| 96 | 103 |
| 97 // DOMView for rendering a webpage as a webui login. | 104 // DOMView for rendering a webpage as a webui login. |
| 98 DOMView* webui_login_; | 105 DOMView* webui_login_; |
| 99 | 106 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 113 | 120 |
| 114 // Converts keyboard events on the TabContents to accelerators. | 121 // Converts keyboard events on the TabContents to accelerators. |
| 115 UnhandledKeyboardEventHandler unhandled_keyboard_event_handler_; | 122 UnhandledKeyboardEventHandler unhandled_keyboard_event_handler_; |
| 116 | 123 |
| 117 // Maps installed accelerators to OOBE webui accelerator identifiers. | 124 // Maps installed accelerators to OOBE webui accelerator identifiers. |
| 118 AccelMap accel_map_; | 125 AccelMap accel_map_; |
| 119 | 126 |
| 120 // Proxy settings dialog that can be invoked from network menu. | 127 // Proxy settings dialog that can be invoked from network menu. |
| 121 scoped_ptr<LoginHtmlDialog> proxy_settings_dialog_; | 128 scoped_ptr<LoginHtmlDialog> proxy_settings_dialog_; |
| 122 | 129 |
| 130 // Watches webui_login_'s TabContents rendering. |
| 131 scoped_ptr<TabFirstRenderWatcher> tab_watcher_; |
| 132 |
| 133 // Whether the host window is frozen. |
| 134 bool host_window_frozen_; |
| 135 |
| 123 DISALLOW_COPY_AND_ASSIGN(WebUILoginView); | 136 DISALLOW_COPY_AND_ASSIGN(WebUILoginView); |
| 124 }; | 137 }; |
| 125 | 138 |
| 126 } // namespace chromeos | 139 } // namespace chromeos |
| 127 | 140 |
| 128 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_VIEW_H_ | 141 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_VIEW_H_ |
| OLD | NEW |