| 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_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; | 19 virtual bool RunImpl() OVERRIDE; |
| 20 DECLARE_EXTENSION_FUNCTION_NAME("experimental.input.sendKeyboardEvent"); | 20 DECLARE_EXTENSION_FUNCTION_NAME( |
| 21 "experimental.input.virtualKeyboard.sendKeyboardEvent"); |
| 21 }; | 22 }; |
| 22 | 23 |
| 23 #if defined(USE_VIRTUAL_KEYBOARD) | 24 #if defined(USE_VIRTUAL_KEYBOARD) |
| 24 class HideKeyboardFunction : public AsyncExtensionFunction { | 25 class HideKeyboardFunction : public AsyncExtensionFunction { |
| 25 public: | 26 public: |
| 26 virtual bool RunImpl() OVERRIDE; | 27 virtual bool RunImpl() OVERRIDE; |
| 27 DECLARE_EXTENSION_FUNCTION_NAME("experimental.input.hideKeyboard"); | 28 DECLARE_EXTENSION_FUNCTION_NAME( |
| 29 "experimental.input.virtualKeyboard.hideKeyboard"); |
| 28 }; | 30 }; |
| 29 | 31 |
| 30 class SetKeyboardHeightFunction : public AsyncExtensionFunction { | 32 class SetKeyboardHeightFunction : public AsyncExtensionFunction { |
| 31 public: | 33 public: |
| 32 virtual bool RunImpl() OVERRIDE; | 34 virtual bool RunImpl() OVERRIDE; |
| 33 DECLARE_EXTENSION_FUNCTION_NAME("experimental.input.setKeyboardHeight"); | 35 DECLARE_EXTENSION_FUNCTION_NAME( |
| 36 "experimental.input.virtualKeyboard.setKeyboardHeight"); |
| 34 }; | 37 }; |
| 35 #endif | 38 #endif |
| 36 | 39 |
| 37 #if defined(OS_CHROMEOS) && defined(TOUCH_UI) | 40 #if defined(OS_CHROMEOS) && defined(TOUCH_UI) |
| 38 // Note that this experimental APIs are currently only available for | 41 // Note that this experimental APIs are currently only available for |
| 39 // TOUCH_UI version of Chrome OS. Please also note that the version of Chrome | 42 // TOUCH_UI version of Chrome OS. Please also note that the version of Chrome |
| 40 // OS is always built with TOOLKIT_VIEWS. | 43 // OS is always built with TOOLKIT_VIEWS. |
| 41 // | 44 // |
| 42 // We may eventually support other platforms, especially non TOUCH_UI version | 45 // We may eventually support other platforms, especially non TOUCH_UI version |
| 43 // of Chrome OS. | 46 // of Chrome OS. |
| 44 class SendHandwritingStrokeFunction : public SyncExtensionFunction { | 47 class SendHandwritingStrokeFunction : public SyncExtensionFunction { |
| 45 public: | 48 public: |
| 46 virtual bool RunImpl() OVERRIDE; | 49 virtual bool RunImpl() OVERRIDE; |
| 47 DECLARE_EXTENSION_FUNCTION_NAME("experimental.input.sendHandwritingStroke"); | 50 DECLARE_EXTENSION_FUNCTION_NAME( |
| 51 "experimental.input.virtualKeyboard.sendHandwritingStroke"); |
| 48 }; | 52 }; |
| 49 | 53 |
| 50 class CancelHandwritingStrokesFunction : public SyncExtensionFunction { | 54 class CancelHandwritingStrokesFunction : public SyncExtensionFunction { |
| 51 public: | 55 public: |
| 52 virtual bool RunImpl() OVERRIDE; | 56 virtual bool RunImpl() OVERRIDE; |
| 53 DECLARE_EXTENSION_FUNCTION_NAME( | 57 DECLARE_EXTENSION_FUNCTION_NAME( |
| 54 "experimental.input.cancelHandwritingStrokes"); | 58 "experimental.input.virtualKeyboard.cancelHandwritingStrokes"); |
| 55 }; | 59 }; |
| 56 #endif | 60 #endif |
| 57 | 61 |
| 58 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INPUT_API_H_ | 62 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INPUT_API_H_ |
| OLD | NEW |