| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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_API_INPUT_INPUT_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_INPUT_INPUT_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_INPUT_INPUT_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_INPUT_INPUT_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "extensions/browser/browser_context_keyed_api_factory.h" | 9 #include "extensions/browser/browser_context_keyed_api_factory.h" |
| 10 #include "extensions/browser/extension_function.h" | 10 #include "extensions/browser/extension_function.h" |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 "virtualKeyboardPrivate.getKeyboardConfig", | 102 "virtualKeyboardPrivate.getKeyboardConfig", |
| 103 VIRTUALKEYBOARDPRIVATE_GETKEYBOARDCONFIG); | 103 VIRTUALKEYBOARDPRIVATE_GETKEYBOARDCONFIG); |
| 104 | 104 |
| 105 protected: | 105 protected: |
| 106 virtual ~VirtualKeyboardPrivateGetKeyboardConfigFunction() {} | 106 virtual ~VirtualKeyboardPrivateGetKeyboardConfigFunction() {} |
| 107 | 107 |
| 108 // ExtensionFunction: | 108 // ExtensionFunction: |
| 109 virtual bool RunSync() OVERRIDE; | 109 virtual bool RunSync() OVERRIDE; |
| 110 }; | 110 }; |
| 111 | 111 |
| 112 class VirtualKeyboardPrivateOpenSettingsFunction |
| 113 : public SyncExtensionFunction { |
| 114 public: |
| 115 DECLARE_EXTENSION_FUNCTION("virtualKeyboardPrivate.openSettings", |
| 116 VIRTUALKEYBOARDPRIVATE_OPENSETTINGS); |
| 117 |
| 118 protected: |
| 119 virtual ~VirtualKeyboardPrivateOpenSettingsFunction() {} |
| 120 |
| 121 // ExtensionFunction: |
| 122 virtual bool RunSync() OVERRIDE; |
| 123 }; |
| 124 |
| 125 |
| 112 class InputAPI : public BrowserContextKeyedAPI { | 126 class InputAPI : public BrowserContextKeyedAPI { |
| 113 public: | 127 public: |
| 114 explicit InputAPI(content::BrowserContext* context); | 128 explicit InputAPI(content::BrowserContext* context); |
| 115 virtual ~InputAPI(); | 129 virtual ~InputAPI(); |
| 116 | 130 |
| 117 // BrowserContextKeyedAPI implementation. | 131 // BrowserContextKeyedAPI implementation. |
| 118 static BrowserContextKeyedAPIFactory<InputAPI>* GetFactoryInstance(); | 132 static BrowserContextKeyedAPIFactory<InputAPI>* GetFactoryInstance(); |
| 119 | 133 |
| 120 private: | 134 private: |
| 121 friend class BrowserContextKeyedAPIFactory<InputAPI>; | 135 friend class BrowserContextKeyedAPIFactory<InputAPI>; |
| 122 | 136 |
| 123 // BrowserContextKeyedAPI implementation. | 137 // BrowserContextKeyedAPI implementation. |
| 124 static const char* service_name() { | 138 static const char* service_name() { |
| 125 return "InputAPI"; | 139 return "InputAPI"; |
| 126 } | 140 } |
| 127 static const bool kServiceIsNULLWhileTesting = true; | 141 static const bool kServiceIsNULLWhileTesting = true; |
| 128 }; | 142 }; |
| 129 | 143 |
| 130 } // namespace extensions | 144 } // namespace extensions |
| 131 | 145 |
| 132 #endif // CHROME_BROWSER_EXTENSIONS_API_INPUT_INPUT_H_ | 146 #endif // CHROME_BROWSER_EXTENSIONS_API_INPUT_INPUT_H_ |
| OLD | NEW |