| 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 virtual bool RunImpl() OVERRIDE; | |
| 20 DECLARE_EXTENSION_FUNCTION_NAME( | 19 DECLARE_EXTENSION_FUNCTION_NAME( |
| 21 "experimental.input.virtualKeyboard.sendKeyboardEvent"); | 20 "experimental.input.virtualKeyboard.sendKeyboardEvent"); |
| 21 |
| 22 protected: |
| 23 virtual ~SendKeyboardEventInputFunction() {} |
| 24 |
| 25 // ExtensionFunction: |
| 26 virtual bool RunImpl() OVERRIDE; |
| 22 }; | 27 }; |
| 23 | 28 |
| 24 #if defined(USE_VIRTUAL_KEYBOARD) | 29 #if defined(USE_VIRTUAL_KEYBOARD) |
| 25 class HideKeyboardFunction : public AsyncExtensionFunction { | 30 class HideKeyboardFunction : public AsyncExtensionFunction { |
| 26 public: | 31 public: |
| 27 virtual bool RunImpl() OVERRIDE; | |
| 28 DECLARE_EXTENSION_FUNCTION_NAME( | 32 DECLARE_EXTENSION_FUNCTION_NAME( |
| 29 "experimental.input.virtualKeyboard.hideKeyboard"); | 33 "experimental.input.virtualKeyboard.hideKeyboard"); |
| 34 |
| 35 protected: |
| 36 virtual ~HideKeyboardFunction() {} |
| 37 |
| 38 // ExtensionFunction: |
| 39 virtual bool RunImpl() OVERRIDE; |
| 30 }; | 40 }; |
| 31 | 41 |
| 32 class SetKeyboardHeightFunction : public AsyncExtensionFunction { | 42 class SetKeyboardHeightFunction : public AsyncExtensionFunction { |
| 33 public: | 43 public: |
| 34 virtual bool RunImpl() OVERRIDE; | |
| 35 DECLARE_EXTENSION_FUNCTION_NAME( | 44 DECLARE_EXTENSION_FUNCTION_NAME( |
| 36 "experimental.input.virtualKeyboard.setKeyboardHeight"); | 45 "experimental.input.virtualKeyboard.setKeyboardHeight"); |
| 46 |
| 47 protected: |
| 48 virtual ~SetKeyboardHeightFunction() {} |
| 49 |
| 50 // ExtensionFunction: |
| 51 virtual bool RunImpl() OVERRIDE; |
| 37 }; | 52 }; |
| 38 #endif | 53 #endif |
| 39 | 54 |
| 40 #if defined(OS_CHROMEOS) && defined(USE_VIRTUAL_KEYBOARD) | 55 #if defined(OS_CHROMEOS) && defined(USE_VIRTUAL_KEYBOARD) |
| 41 // Note that these experimental APIs are currently only available for | 56 // Note that these experimental APIs are currently only available for |
| 42 // versions of Chrome OS built with USE_VIRTUAL_KEYBOARD. Please also note that | 57 // versions of Chrome OS built with USE_VIRTUAL_KEYBOARD. Please also note that |
| 43 // the version of Chrome OS is always built with TOOLKIT_VIEWS. | 58 // the version of Chrome OS is always built with TOOLKIT_VIEWS. |
| 44 // | 59 // |
| 45 // We may eventually support other platforms, especially versions of ChromeOS | 60 // We may eventually support other platforms, especially versions of ChromeOS |
| 46 // without USE_VIRTUAL_KEYBOARD. | 61 // without USE_VIRTUAL_KEYBOARD. |
| 47 class SendHandwritingStrokeFunction : public SyncExtensionFunction { | 62 class SendHandwritingStrokeFunction : public SyncExtensionFunction { |
| 48 public: | 63 public: |
| 49 virtual bool RunImpl() OVERRIDE; | |
| 50 DECLARE_EXTENSION_FUNCTION_NAME( | 64 DECLARE_EXTENSION_FUNCTION_NAME( |
| 51 "experimental.input.virtualKeyboard.sendHandwritingStroke"); | 65 "experimental.input.virtualKeyboard.sendHandwritingStroke"); |
| 66 |
| 67 protected: |
| 68 virtual ~SendHandwritingStrokeFunction() {} |
| 69 virtual bool RunImpl() OVERRIDE; |
| 52 }; | 70 }; |
| 53 | 71 |
| 54 class CancelHandwritingStrokesFunction : public SyncExtensionFunction { | 72 class CancelHandwritingStrokesFunction : public SyncExtensionFunction { |
| 55 public: | 73 public: |
| 56 virtual bool RunImpl() OVERRIDE; | |
| 57 DECLARE_EXTENSION_FUNCTION_NAME( | 74 DECLARE_EXTENSION_FUNCTION_NAME( |
| 58 "experimental.input.virtualKeyboard.cancelHandwritingStrokes"); | 75 "experimental.input.virtualKeyboard.cancelHandwritingStrokes"); |
| 76 |
| 77 public: |
| 78 virtual ~CancelHandwritingStrokesFunction() {} |
| 79 virtual bool RunImpl() OVERRIDE; |
| 59 }; | 80 }; |
| 60 #endif | 81 #endif |
| 61 | 82 |
| 62 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INPUT_API_H_ | 83 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INPUT_API_H_ |
| OLD | NEW |