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

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

Issue 1657593007: Implement chrome.input.ime.setComposition/commitText API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use Xxx::Results::Create(). Created 4 years, 10 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 DECLARE_EXTENSION_FUNCTION("input.ime.keyEventHandled", 121 DECLARE_EXTENSION_FUNCTION("input.ime.keyEventHandled",
122 INPUT_IME_KEYEVENTHANDLED) 122 INPUT_IME_KEYEVENTHANDLED)
123 123
124 protected: 124 protected:
125 ~InputImeKeyEventHandledFunction() override {} 125 ~InputImeKeyEventHandledFunction() override {}
126 126
127 // UIThreadExtensionFunction: 127 // UIThreadExtensionFunction:
128 ResponseAction Run() override; 128 ResponseAction Run() override;
129 }; 129 };
130 130
131 class InputImeSetCompositionFunction : public UIThreadExtensionFunction {
132 public:
133 DECLARE_EXTENSION_FUNCTION("input.ime.setComposition",
134 INPUT_IME_SETCOMPOSITION)
135
136 protected:
137 ~InputImeSetCompositionFunction() override {}
138
139 // UIThreadExtensionFunction:
140 ResponseAction Run() override;
141 };
142
143 class InputImeCommitTextFunction : public UIThreadExtensionFunction {
144 public:
145 DECLARE_EXTENSION_FUNCTION("input.ime.commitText", INPUT_IME_COMMITTEXT)
146
147 protected:
148 ~InputImeCommitTextFunction() override {}
149
150 // UIThreadExtensionFunction:
151 ResponseAction Run() override;
152 };
153
131 class InputImeAPI : public BrowserContextKeyedAPI, 154 class InputImeAPI : public BrowserContextKeyedAPI,
132 public ExtensionRegistryObserver, 155 public ExtensionRegistryObserver,
133 public EventRouter::Observer { 156 public EventRouter::Observer {
134 public: 157 public:
135 explicit InputImeAPI(content::BrowserContext* context); 158 explicit InputImeAPI(content::BrowserContext* context);
136 ~InputImeAPI() override; 159 ~InputImeAPI() override;
137 160
138 // BrowserContextKeyedAPI implementation. 161 // BrowserContextKeyedAPI implementation.
139 static BrowserContextKeyedAPIFactory<InputImeAPI>* GetFactoryInstance(); 162 static BrowserContextKeyedAPIFactory<InputImeAPI>* GetFactoryInstance();
140 163
(...skipping 22 matching lines...) Expand all
163 // Listen to extension load, unloaded notifications. 186 // Listen to extension load, unloaded notifications.
164 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> 187 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver>
165 extension_registry_observer_; 188 extension_registry_observer_;
166 }; 189 };
167 190
168 InputImeEventRouter* GetInputImeEventRouter(Profile* profile); 191 InputImeEventRouter* GetInputImeEventRouter(Profile* profile);
169 192
170 } // namespace extensions 193 } // namespace extensions
171 194
172 #endif // CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_H_ 195 #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