| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 12 matching lines...) Expand all Loading... |
| 23 class WebUI; | 23 class WebUI; |
| 24 } | 24 } |
| 25 | 25 |
| 26 namespace views { | 26 namespace views { |
| 27 class View; | 27 class View; |
| 28 class WebView; | 28 class WebView; |
| 29 class Widget; | 29 class Widget; |
| 30 } | 30 } |
| 31 | 31 |
| 32 class TabContents; | 32 class TabContents; |
| 33 typedef TabContents TabContentsWrapper; | |
| 34 | 33 |
| 35 namespace chromeos { | 34 namespace chromeos { |
| 36 | 35 |
| 37 // View used to render a WebUI supporting Widget. This widget is used for the | 36 // View used to render a WebUI supporting Widget. This widget is used for the |
| 38 // WebUI based start up and lock screens. It contains a WebView. | 37 // WebUI based start up and lock screens. It contains a WebView. |
| 39 class WebUILoginView : public views::WidgetDelegateView, | 38 class WebUILoginView : public views::WidgetDelegateView, |
| 40 public content::WebContentsDelegate, | 39 public content::WebContentsDelegate, |
| 41 public content::NotificationObserver, | 40 public content::NotificationObserver, |
| 42 public TabRenderWatcher::Delegate { | 41 public TabRenderWatcher::Delegate { |
| 43 public: | 42 public: |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 // 1. Emits LoginPromptVisible signal if needed | 116 // 1. Emits LoginPromptVisible signal if needed |
| 118 // 2. Notifies OOBE/sign classes. | 117 // 2. Notifies OOBE/sign classes. |
| 119 void OnLoginPromptVisible(); | 118 void OnLoginPromptVisible(); |
| 120 | 119 |
| 121 // Called when focus is returned from status area. | 120 // Called when focus is returned from status area. |
| 122 // |reverse| is true when focus is traversed backwards (using Shift-Tab). | 121 // |reverse| is true when focus is traversed backwards (using Shift-Tab). |
| 123 void ReturnFocus(bool reverse); | 122 void ReturnFocus(bool reverse); |
| 124 | 123 |
| 125 content::NotificationRegistrar registrar_; | 124 content::NotificationRegistrar registrar_; |
| 126 | 125 |
| 127 // TabContentsWrapper for the WebView. | 126 // TabContents for the WebView. |
| 128 // TODO: this is needed for password manager, should be refactored/replaced | 127 // TODO: this is needed for password manager, should be refactored/replaced |
| 129 // so that this code can move to src/ash. | 128 // so that this code can move to src/ash. |
| 130 scoped_ptr<TabContentsWrapper> wrapper_; | 129 scoped_ptr<TabContents> tab_contents_; |
| 131 | 130 |
| 132 // Login window which shows the view. | 131 // Login window which shows the view. |
| 133 views::Widget* login_window_; | 132 views::Widget* login_window_; |
| 134 | 133 |
| 135 // Converts keyboard events on the WebContents to accelerators. | 134 // Converts keyboard events on the WebContents to accelerators. |
| 136 UnhandledKeyboardEventHandler unhandled_keyboard_event_handler_; | 135 UnhandledKeyboardEventHandler unhandled_keyboard_event_handler_; |
| 137 | 136 |
| 138 // Maps installed accelerators to OOBE webui accelerator identifiers. | 137 // Maps installed accelerators to OOBE webui accelerator identifiers. |
| 139 AccelMap accel_map_; | 138 AccelMap accel_map_; |
| 140 | 139 |
| 141 // Watches webui_login_'s WebContents rendering. | 140 // Watches webui_login_'s WebContents rendering. |
| 142 scoped_ptr<TabRenderWatcher> tab_watcher_; | 141 scoped_ptr<TabRenderWatcher> tab_watcher_; |
| 143 | 142 |
| 144 // Whether the host window is frozen. | 143 // Whether the host window is frozen. |
| 145 bool host_window_frozen_; | 144 bool host_window_frozen_; |
| 146 | 145 |
| 147 // Should we emit the login-prompt-visible signal when the login page is | 146 // Should we emit the login-prompt-visible signal when the login page is |
| 148 // displayed? | 147 // displayed? |
| 149 bool should_emit_login_prompt_visible_; | 148 bool should_emit_login_prompt_visible_; |
| 150 | 149 |
| 151 DISALLOW_COPY_AND_ASSIGN(WebUILoginView); | 150 DISALLOW_COPY_AND_ASSIGN(WebUILoginView); |
| 152 }; | 151 }; |
| 153 | 152 |
| 154 } // namespace chromeos | 153 } // namespace chromeos |
| 155 | 154 |
| 156 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_VIEW_H_ | 155 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_VIEW_H_ |
| OLD | NEW |