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

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

Issue 1554983002: Build chrome.input.ime.* API in GN mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_CHROMEOS_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_CHROMEOS_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_CHROMEOS_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_CHROMEOS_H_
7 7
8 #include <map>
9
10 #include "chrome/browser/extensions/api/input_ime/input_ime_event_router_base.h"
11 #include "chrome/browser/profiles/profile.h"
Devlin 2016/01/07 23:08:29 ditto from line 13.
Azure Wei 2016/01/08 06:40:55 Done.
8 #include "extensions/browser/extension_function.h" 12 #include "extensions/browser/extension_function.h"
13 #include "ui/base/ime/ime_engine_handler_interface.h"
Devlin 2016/01/07 23:08:29 Do we need to include this, or do forward declarat
Azure Wei 2016/01/08 06:40:55 No need. I've removed these.
14
15 class Profile;
16
17 namespace ui {
18 class IMEEngineHandlerInterface;
19 } // namespace ui
9 20
10 namespace extensions { 21 namespace extensions {
22 class InputImeEventRouterBase;
23 struct InputComponentInfo;
11 24
12 class InputImeSetCompositionFunction : public SyncExtensionFunction { 25 class InputImeSetCompositionFunction : public SyncExtensionFunction {
13 public: 26 public:
14 DECLARE_EXTENSION_FUNCTION("input.ime.setComposition", 27 DECLARE_EXTENSION_FUNCTION("input.ime.setComposition",
15 INPUT_IME_SETCOMPOSITION) 28 INPUT_IME_SETCOMPOSITION)
16 29
17 protected: 30 protected:
18 ~InputImeSetCompositionFunction() override {} 31 ~InputImeSetCompositionFunction() override {}
19 32
20 // ExtensionFunction: 33 // ExtensionFunction:
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 DECLARE_EXTENSION_FUNCTION("input.ime.hideInputView", 144 DECLARE_EXTENSION_FUNCTION("input.ime.hideInputView",
132 INPUT_IME_HIDEINPUTVIEW) 145 INPUT_IME_HIDEINPUTVIEW)
133 146
134 protected: 147 protected:
135 ~InputImeHideInputViewFunction() override {} 148 ~InputImeHideInputViewFunction() override {}
136 149
137 // ExtensionFunction: 150 // ExtensionFunction:
138 bool RunAsync() override; 151 bool RunAsync() override;
139 }; 152 };
140 153
154 class InputImeEventRouter : public InputImeEventRouterBase {
155 public:
156 explicit InputImeEventRouter(Profile* profile);
157 ~InputImeEventRouter() override;
158
159 bool RegisterImeExtension(
160 const std::string& extension_id,
161 const std::vector<extensions::InputComponentInfo>& input_components);
Devlin 2016/01/07 23:08:29 #include <vector>
Azure Wei 2016/01/08 06:40:55 Done.
162 void UnregisterAllImes(const std::string& extension_id);
163
164 ui::IMEEngineHandlerInterface* GetEngine(const std::string& extension_id,
165 const std::string& component_id);
166 ui::IMEEngineHandlerInterface* GetActiveEngine(
167 const std::string& extension_id);
168
169 private:
170 // The engine map from extension_id to an engine.
171 std::map<std::string, ui::IMEEngineHandlerInterface*> engine_map_;
Devlin 2016/01/07 23:08:29 #include <string>
Azure Wei 2016/01/08 06:40:55 Done.
172
173 DISALLOW_COPY_AND_ASSIGN(InputImeEventRouter);
174 };
175
141 } // namespace extensions 176 } // namespace extensions
142 177
143 #endif // CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_CHROMEOS_H_ 178 #endif // CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_CHROMEOS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698