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

Side by Side Diff: chrome/browser/chromeos/extensions/input_method_api.h

Issue 1656083003: Adds the input method private API to allow the component IME extension to change the XKB layout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2623
Patch Set: 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/input_method_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_CHROMEOS_EXTENSIONS_INPUT_METHOD_API_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_INPUT_METHOD_API_H_
6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_INPUT_METHOD_API_H_ 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_INPUT_METHOD_API_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 ~InputMethodPrivateGetEncryptSyncEnabledFunction() override {} 132 ~InputMethodPrivateGetEncryptSyncEnabledFunction() override {}
133 133
134 ResponseAction Run() override; 134 ResponseAction Run() override;
135 135
136 private: 136 private:
137 DECLARE_EXTENSION_FUNCTION("inputMethodPrivate.getEncryptSyncEnabled", 137 DECLARE_EXTENSION_FUNCTION("inputMethodPrivate.getEncryptSyncEnabled",
138 INPUTMETHODPRIVATE_GETENCRYPTSYNCENABLED) 138 INPUTMETHODPRIVATE_GETENCRYPTSYNCENABLED)
139 DISALLOW_COPY_AND_ASSIGN(InputMethodPrivateGetEncryptSyncEnabledFunction); 139 DISALLOW_COPY_AND_ASSIGN(InputMethodPrivateGetEncryptSyncEnabledFunction);
140 }; 140 };
141 141
142 // Implements the inputMethodPrivate.setXkbLayout method.
143 class InputMethodPrivateSetXkbLayoutFunction
144 : public UIThreadExtensionFunction {
145 public:
146 InputMethodPrivateSetXkbLayoutFunction() {}
147
148 protected:
149 ~InputMethodPrivateSetXkbLayoutFunction() override {}
150
151 ResponseAction Run() override;
152
153 private:
154 DECLARE_EXTENSION_FUNCTION("inputMethodPrivate.setXkbLayout",
155 INPUTMETHODPRIVATE_SETXKBLAYOUT)
156 DISALLOW_COPY_AND_ASSIGN(InputMethodPrivateSetXkbLayoutFunction);
157 };
158
142 class InputMethodAPI : public BrowserContextKeyedAPI, 159 class InputMethodAPI : public BrowserContextKeyedAPI,
143 public extensions::EventRouter::Observer { 160 public extensions::EventRouter::Observer {
144 public: 161 public:
145 explicit InputMethodAPI(content::BrowserContext* context); 162 explicit InputMethodAPI(content::BrowserContext* context);
146 ~InputMethodAPI() override; 163 ~InputMethodAPI() override;
147 164
148 // Returns input method name for the given XKB (X keyboard extensions in X 165 // Returns input method name for the given XKB (X keyboard extensions in X
149 // Window System) id. 166 // Window System) id.
150 static std::string GetInputMethodForXkb(const std::string& xkb_id); 167 static std::string GetInputMethodForXkb(const std::string& xkb_id);
151 168
(...skipping 22 matching lines...) Expand all
174 input_method_event_router_; 191 input_method_event_router_;
175 scoped_ptr<chromeos::ExtensionDictionaryEventRouter> 192 scoped_ptr<chromeos::ExtensionDictionaryEventRouter>
176 dictionary_event_router_; 193 dictionary_event_router_;
177 194
178 DISALLOW_COPY_AND_ASSIGN(InputMethodAPI); 195 DISALLOW_COPY_AND_ASSIGN(InputMethodAPI);
179 }; 196 };
180 197
181 } // namespace extensions 198 } // namespace extensions
182 199
183 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_INPUT_METHOD_API_H_ 200 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_INPUT_METHOD_API_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/input_method_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698