Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Side by Side Diff: chrome/browser/extensions/api/input_ime/input_ime_api.h

Issue 1771173002: Implement input.ime.sendKeyEvents API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test failure. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_API_INPUT_IME_INPUT_IME_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 public: 144 public:
145 DECLARE_EXTENSION_FUNCTION("input.ime.commitText", INPUT_IME_COMMITTEXT) 145 DECLARE_EXTENSION_FUNCTION("input.ime.commitText", INPUT_IME_COMMITTEXT)
146 146
147 protected: 147 protected:
148 ~InputImeCommitTextFunction() override {} 148 ~InputImeCommitTextFunction() override {}
149 149
150 // UIThreadExtensionFunction: 150 // UIThreadExtensionFunction:
151 ResponseAction Run() override; 151 ResponseAction Run() override;
152 }; 152 };
153 153
154 class InputImeSendKeyEventsFunction : public UIThreadExtensionFunction {
155 public:
156 DECLARE_EXTENSION_FUNCTION("input.ime.sendKeyEvents", INPUT_IME_SENDKEYEVENTS)
157
158 protected:
159 ~InputImeSendKeyEventsFunction() override {}
160
161 // UIThreadExtensionFunction:
162 ResponseAction Run() override;
163 };
164
154 class InputImeAPI : public BrowserContextKeyedAPI, 165 class InputImeAPI : public BrowserContextKeyedAPI,
155 public ExtensionRegistryObserver, 166 public ExtensionRegistryObserver,
156 public EventRouter::Observer { 167 public EventRouter::Observer {
157 public: 168 public:
158 explicit InputImeAPI(content::BrowserContext* context); 169 explicit InputImeAPI(content::BrowserContext* context);
159 ~InputImeAPI() override; 170 ~InputImeAPI() override;
160 171
161 // BrowserContextKeyedAPI implementation. 172 // BrowserContextKeyedAPI implementation.
162 static BrowserContextKeyedAPIFactory<InputImeAPI>* GetFactoryInstance(); 173 static BrowserContextKeyedAPIFactory<InputImeAPI>* GetFactoryInstance();
163 174
(...skipping 22 matching lines...) Expand all
186 // Listen to extension load, unloaded notifications. 197 // Listen to extension load, unloaded notifications.
187 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> 198 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver>
188 extension_registry_observer_; 199 extension_registry_observer_;
189 }; 200 };
190 201
191 InputImeEventRouter* GetInputImeEventRouter(Profile* profile); 202 InputImeEventRouter* GetInputImeEventRouter(Profile* profile);
192 203
193 } // namespace extensions 204 } // namespace extensions
194 205
195 #endif // CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_H_ 206 #endif // CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/input_method/input_method_engine.cc ('k') | chrome/browser/extensions/api/input_ime/input_ime_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698