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 "chrome/browser/extensions/api/profile_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" |
11 | 11 |
12 namespace content { | 12 namespace content { |
13 class BrowserContext; | 13 class BrowserContext; |
14 } | 14 } |
15 | 15 |
16 namespace extensions { | 16 namespace extensions { |
17 | 17 |
18 class VirtualKeyboardPrivateInsertTextFunction : public SyncExtensionFunction { | 18 class VirtualKeyboardPrivateInsertTextFunction : public SyncExtensionFunction { |
19 public: | 19 public: |
(...skipping 82 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 RunImpl() OVERRIDE; | 109 virtual bool RunImpl() OVERRIDE; |
110 }; | 110 }; |
111 | 111 |
112 class InputAPI : public ProfileKeyedAPI { | 112 class InputAPI : public BrowserContextKeyedAPI { |
113 public: | 113 public: |
114 explicit InputAPI(content::BrowserContext* context); | 114 explicit InputAPI(content::BrowserContext* context); |
115 virtual ~InputAPI(); | 115 virtual ~InputAPI(); |
116 | 116 |
117 // ProfileKeyedAPI implementation. | 117 // BrowserContextKeyedAPI implementation. |
118 static ProfileKeyedAPIFactory<InputAPI>* GetFactoryInstance(); | 118 static BrowserContextKeyedAPIFactory<InputAPI>* GetFactoryInstance(); |
119 | 119 |
120 private: | 120 private: |
121 friend class ProfileKeyedAPIFactory<InputAPI>; | 121 friend class BrowserContextKeyedAPIFactory<InputAPI>; |
122 | 122 |
123 // ProfileKeyedAPI implementation. | 123 // BrowserContextKeyedAPI implementation. |
124 static const char* service_name() { | 124 static const char* service_name() { |
125 return "InputAPI"; | 125 return "InputAPI"; |
126 } | 126 } |
127 static const bool kServiceIsNULLWhileTesting = true; | 127 static const bool kServiceIsNULLWhileTesting = true; |
128 }; | 128 }; |
129 | 129 |
130 } // namespace extensions | 130 } // namespace extensions |
131 | 131 |
132 #endif // CHROME_BROWSER_EXTENSIONS_API_INPUT_INPUT_H_ | 132 #endif // CHROME_BROWSER_EXTENSIONS_API_INPUT_INPUT_H_ |
OLD | NEW |