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 11 matching lines...) Expand all Loading... |
22 namespace content { | 22 namespace content { |
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 TabContentsWrapper; |
| 33 |
32 namespace chromeos { | 34 namespace chromeos { |
33 | 35 |
34 // 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 |
35 // WebUI based start up and lock screens. It contains a WebView. | 37 // WebUI based start up and lock screens. It contains a WebView. |
36 class WebUILoginView : public views::WidgetDelegateView, | 38 class WebUILoginView : public views::WidgetDelegateView, |
37 public content::WebContentsDelegate, | 39 public content::WebContentsDelegate, |
38 public content::NotificationObserver, | 40 public content::NotificationObserver, |
39 public TabRenderWatcher::Delegate { | 41 public TabRenderWatcher::Delegate { |
40 public: | 42 public: |
41 WebUILoginView(); | 43 WebUILoginView(); |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 virtual bool IsPopupOrPanel( | 110 virtual bool IsPopupOrPanel( |
109 const content::WebContents* source) const OVERRIDE; | 111 const content::WebContents* source) const OVERRIDE; |
110 virtual bool TakeFocus(bool reverse) OVERRIDE; | 112 virtual bool TakeFocus(bool reverse) OVERRIDE; |
111 | 113 |
112 // Called when focus is returned from status area. | 114 // Called when focus is returned from status area. |
113 // |reverse| is true when focus is traversed backwards (using Shift-Tab). | 115 // |reverse| is true when focus is traversed backwards (using Shift-Tab). |
114 void ReturnFocus(bool reverse); | 116 void ReturnFocus(bool reverse); |
115 | 117 |
116 content::NotificationRegistrar registrar_; | 118 content::NotificationRegistrar registrar_; |
117 | 119 |
| 120 // TabContentsWrapper for the WebView. |
| 121 // TODO: this is needed for password manager, should be refactored/replaced |
| 122 // so that this code can move to src/ash. |
| 123 scoped_ptr<TabContentsWrapper> wrapper_; |
| 124 |
118 // Login window which shows the view. | 125 // Login window which shows the view. |
119 views::Widget* login_window_; | 126 views::Widget* login_window_; |
120 | 127 |
121 // Converts keyboard events on the WebContents to accelerators. | 128 // Converts keyboard events on the WebContents to accelerators. |
122 UnhandledKeyboardEventHandler unhandled_keyboard_event_handler_; | 129 UnhandledKeyboardEventHandler unhandled_keyboard_event_handler_; |
123 | 130 |
124 // Maps installed accelerators to OOBE webui accelerator identifiers. | 131 // Maps installed accelerators to OOBE webui accelerator identifiers. |
125 AccelMap accel_map_; | 132 AccelMap accel_map_; |
126 | 133 |
127 // Watches webui_login_'s WebContents rendering. | 134 // Watches webui_login_'s WebContents rendering. |
(...skipping 10 matching lines...) Expand all Loading... |
138 // Should we emit the login-prompt-visible signal when the login page is | 145 // Should we emit the login-prompt-visible signal when the login page is |
139 // displayed? | 146 // displayed? |
140 bool should_emit_login_prompt_visible_; | 147 bool should_emit_login_prompt_visible_; |
141 | 148 |
142 DISALLOW_COPY_AND_ASSIGN(WebUILoginView); | 149 DISALLOW_COPY_AND_ASSIGN(WebUILoginView); |
143 }; | 150 }; |
144 | 151 |
145 } // namespace chromeos | 152 } // namespace chromeos |
146 | 153 |
147 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_VIEW_H_ | 154 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_VIEW_H_ |
OLD | NEW |