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_EXTENSIONS_EXTENSION_INPUT_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_INPUT_API_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_INPUT_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_INPUT_API_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "chrome/browser/extensions/extension_function.h" | 10 #include "chrome/browser/extensions/extension_function.h" |
11 | 11 |
12 // Note that this experimental API is currently only available for | 12 // Note that this experimental API is currently only available for |
13 // TOOLKIT_VIEWS (see chrome/chrome_browser.gypi). | 13 // TOOLKIT_VIEWS (see chrome/chrome_browser.gypi). |
14 // | 14 // |
15 // We may eventually support other platforms by adding the necessary | 15 // We may eventually support other platforms by adding the necessary |
16 // synthetic event distribution code to this Function. | 16 // synthetic event distribution code to this Function. |
17 class SendKeyboardEventInputFunction : public SyncExtensionFunction { | 17 class SendKeyboardEventInputFunction : public SyncExtensionFunction { |
18 public: | 18 public: |
19 DECLARE_EXTENSION_FUNCTION_NAME( | 19 DECLARE_EXTENSION_FUNCTION_NAME( |
20 "experimental.input.virtualKeyboard.sendKeyboardEvent"); | 20 "experimental.input.virtualKeyboard.sendKeyboardEvent"); |
21 | 21 |
22 protected: | 22 protected: |
23 virtual ~SendKeyboardEventInputFunction() {} | 23 virtual ~SendKeyboardEventInputFunction() {} |
24 | 24 |
25 // ExtensionFunction: | 25 // ExtensionFunction: |
26 virtual bool RunImpl() OVERRIDE; | 26 virtual bool RunImpl() OVERRIDE; |
27 }; | 27 }; |
28 | 28 |
29 #if defined(USE_VIRTUAL_KEYBOARD) | |
30 class HideKeyboardFunction : public AsyncExtensionFunction { | |
31 public: | |
32 DECLARE_EXTENSION_FUNCTION_NAME( | |
33 "experimental.input.virtualKeyboard.hideKeyboard"); | |
34 | |
35 protected: | |
36 virtual ~HideKeyboardFunction() {} | |
37 | |
38 // ExtensionFunction: | |
39 virtual bool RunImpl() OVERRIDE; | |
40 }; | |
41 | |
42 class SetKeyboardHeightFunction : public AsyncExtensionFunction { | |
43 public: | |
44 DECLARE_EXTENSION_FUNCTION_NAME( | |
45 "experimental.input.virtualKeyboard.setKeyboardHeight"); | |
46 | |
47 protected: | |
48 virtual ~SetKeyboardHeightFunction() {} | |
49 | |
50 // ExtensionFunction: | |
51 virtual bool RunImpl() OVERRIDE; | |
52 }; | |
53 #endif | |
54 | |
55 #if defined(OS_CHROMEOS) && defined(USE_VIRTUAL_KEYBOARD) | |
56 // Note that these experimental APIs are currently only available for | |
57 // versions of Chrome OS built with USE_VIRTUAL_KEYBOARD. Please also note that | |
58 // the version of Chrome OS is always built with TOOLKIT_VIEWS. | |
59 // | |
60 // We may eventually support other platforms, especially versions of ChromeOS | |
61 // without USE_VIRTUAL_KEYBOARD. | |
62 class SendHandwritingStrokeFunction : public SyncExtensionFunction { | |
63 public: | |
64 DECLARE_EXTENSION_FUNCTION_NAME( | |
65 "experimental.input.virtualKeyboard.sendHandwritingStroke"); | |
66 | |
67 protected: | |
68 virtual ~SendHandwritingStrokeFunction() {} | |
69 virtual bool RunImpl() OVERRIDE; | |
70 }; | |
71 | |
72 class CancelHandwritingStrokesFunction : public SyncExtensionFunction { | |
73 public: | |
74 DECLARE_EXTENSION_FUNCTION_NAME( | |
75 "experimental.input.virtualKeyboard.cancelHandwritingStrokes"); | |
76 | |
77 public: | |
78 virtual ~CancelHandwritingStrokesFunction() {} | |
79 virtual bool RunImpl() OVERRIDE; | |
80 }; | |
81 #endif | |
82 | |
83 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INPUT_API_H_ | 29 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INPUT_API_H_ |
OLD | NEW |