OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 UI_KEYBOARD_KEYBOARD_UI_CONTROLLER_H_ | 5 #ifndef UI_KEYBOARD_KEYBOARD_UI_CONTROLLER_H_ |
6 #define UI_KEYBOARD_KEYBOARD_UI_CONTROLLER_H_ | 6 #define UI_KEYBOARD_KEYBOARD_UI_CONTROLLER_H_ |
7 | 7 |
8 #include "content/public/browser/web_ui_controller.h" | 8 #include "content/public/browser/web_ui_controller.h" |
9 #include "ui/keyboard/keyboard_export.h" | 9 #include "ui/keyboard/keyboard_export.h" |
10 | 10 |
| 11 namespace aura { |
| 12 class RootWindow; |
| 13 }; |
| 14 |
11 namespace content { | 15 namespace content { |
12 class WebUI; | 16 class WebUI; |
13 }; | 17 }; |
14 | 18 |
15 namespace keyboard { | 19 namespace keyboard { |
16 | 20 |
17 // WebUIController for chrome://keyboard/. | 21 // WebUIController for chrome://keyboard/. |
18 class KEYBOARD_EXPORT KeyboardUIController : public content::WebUIController { | 22 class KEYBOARD_EXPORT KeyboardUIController : public content::WebUIController { |
19 public: | 23 public: |
| 24 // Creates a WebUIController for chrome://keyboard that will log events. |
20 explicit KeyboardUIController(content::WebUI* web_ui); | 25 explicit KeyboardUIController(content::WebUI* web_ui); |
| 26 |
| 27 // Creates a WebUIController for chrome://keyboard that will route events |
| 28 // from the keyboard to |root_window|. |
| 29 KeyboardUIController(content::WebUI* web_ui, aura::RootWindow* root_window); |
| 30 |
21 virtual ~KeyboardUIController(); | 31 virtual ~KeyboardUIController(); |
22 | 32 |
23 private: | 33 private: |
| 34 void Init(content::WebUI* web_ui, aura::RootWindow* root_window); |
| 35 |
24 DISALLOW_COPY_AND_ASSIGN(KeyboardUIController); | 36 DISALLOW_COPY_AND_ASSIGN(KeyboardUIController); |
25 }; | 37 }; |
26 | 38 |
27 } // namespace keyboard | 39 } // namespace keyboard |
28 | 40 |
29 #endif // UI_KEYBOARD_KEYBOARD_UI_CONTROLLER_H_ | 41 #endif // UI_KEYBOARD_KEYBOARD_UI_CONTROLLER_H_ |
OLD | NEW |