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/ui/views/unhandled_keyboard_event_handler.h" |
11 #include "content/browser/tab_contents/tab_contents_delegate.h" | 12 #include "content/browser/tab_contents/tab_contents_delegate.h" |
12 #include "views/view.h" | 13 #include "views/view.h" |
13 | 14 |
14 class DOMView; | 15 class DOMView; |
15 class GURL; | 16 class GURL; |
16 class Profile; | 17 class Profile; |
17 class WebUI; | 18 class WebUI; |
18 | 19 |
19 namespace views { | 20 namespace views { |
20 class Widget; | 21 class Widget; |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 virtual void InitStatusArea(); | 91 virtual void InitStatusArea(); |
91 | 92 |
92 StatusAreaView* status_area_; | 93 StatusAreaView* status_area_; |
93 | 94 |
94 Profile* profile_; | 95 Profile* profile_; |
95 | 96 |
96 // DOMView for rendering a webpage as a webui login. | 97 // DOMView for rendering a webpage as a webui login. |
97 DOMView* webui_login_; | 98 DOMView* webui_login_; |
98 | 99 |
99 private: | 100 private: |
| 101 // Map type for the accelerator-to-identifier map. |
| 102 typedef std::map<views::Accelerator, std::string> AccelMap; |
| 103 |
100 // Overridden from TabContentsDelegate. | 104 // Overridden from TabContentsDelegate. |
101 virtual bool HandleContextMenu(const ContextMenuParams& params) OVERRIDE; | 105 virtual bool HandleContextMenu(const ContextMenuParams& params) OVERRIDE; |
102 virtual bool TakeFocus(bool reverse) OVERRIDE; | 106 virtual bool TakeFocus(bool reverse) OVERRIDE; |
| 107 virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event); |
103 | 108 |
104 // Window that contains status area. | 109 // Window that contains status area. |
105 // TODO(nkostylev): Temporary solution till we have | 110 // TODO(nkostylev): Temporary solution till we have |
106 // RenderWidgetHostViewViews working. | 111 // RenderWidgetHostViewViews working. |
107 views::Widget* status_window_; | 112 views::Widget* status_window_; |
108 | 113 |
109 views::Accelerator accel_toggle_accessibility_; | 114 // Converts keyboard events on the TabContents to accelerators. |
| 115 UnhandledKeyboardEventHandler unhandled_keyboard_event_handler_; |
| 116 |
| 117 // Maps installed accelerators to OOBE webui accelerator identifiers. |
| 118 AccelMap accel_map_; |
110 | 119 |
111 // Proxy settings dialog that can be invoked from network menu. | 120 // Proxy settings dialog that can be invoked from network menu. |
112 scoped_ptr<LoginHtmlDialog> proxy_settings_dialog_; | 121 scoped_ptr<LoginHtmlDialog> proxy_settings_dialog_; |
113 | 122 |
114 DISALLOW_COPY_AND_ASSIGN(WebUILoginView); | 123 DISALLOW_COPY_AND_ASSIGN(WebUILoginView); |
115 }; | 124 }; |
116 | 125 |
117 } // namespace chromeos | 126 } // namespace chromeos |
118 | 127 |
119 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_VIEW_H_ | 128 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_VIEW_H_ |
OLD | NEW |