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_HANDLER_H_ | 5 #ifndef UI_KEYBOARD_KEYBOARD_UI_HANDLER_H_ |
6 #define UI_KEYBOARD_KEYBOARD_UI_HANDLER_H_ | 6 #define UI_KEYBOARD_KEYBOARD_UI_HANDLER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "content/public/browser/web_ui_message_handler.h" | 10 #include "content/public/browser/web_ui_message_handler.h" |
11 | 11 |
12 namespace keyboard { | 12 namespace keyboard { |
13 | 13 |
14 // The WebUI handler for chrome://keyboard. Inserts text into the currently | 14 // The WebUI handler for chrome://keyboard. Inserts text into the currently |
15 // focused TextInputClient. | 15 // focused TextInputClient. |
16 class KeyboardUIHandler : public content::WebUIMessageHandler { | 16 class KeyboardUIHandler : public content::WebUIMessageHandler { |
17 public: | 17 public: |
18 KeyboardUIHandler(); | 18 KeyboardUIHandler(); |
19 virtual ~KeyboardUIHandler(); | 19 virtual ~KeyboardUIHandler(); |
20 | 20 |
21 private: | 21 private: |
22 // |content::WebUIMessageHandler| implementation: | 22 // |content::WebUIMessageHandler| implementation: |
23 virtual void RegisterMessages() OVERRIDE; | 23 virtual void RegisterMessages() OVERRIDE; |
24 | 24 |
25 // Callback for the "insertText" message. | 25 // Callback for the "insertText" message. |
26 void HandleInsertTextMessage(const base::ListValue* args); | 26 void HandleInsertTextMessage(const base::ListValue* args); |
27 | 27 |
| 28 // Callback for the "dispatchKeyEvent" message. |
| 29 void HandleDispatchKeyEventMessage(const base::ListValue* args); |
| 30 |
28 DISALLOW_COPY_AND_ASSIGN(KeyboardUIHandler); | 31 DISALLOW_COPY_AND_ASSIGN(KeyboardUIHandler); |
29 }; | 32 }; |
30 | 33 |
31 } // namespace keyboard | 34 } // namespace keyboard |
32 | 35 |
33 #endif // UI_KEYBOARD_KEYBOARD_UI_HANDLER_H_ | 36 #endif // UI_KEYBOARD_KEYBOARD_UI_HANDLER_H_ |
OLD | NEW |