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

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

Issue 2597413002: Makes the InputMethodEngine can be switched per profile when the top-level browser window is switch… (Closed)
Patch Set: . Created 3 years, 12 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_NONCHROMEOS_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_NONCHROMEOS_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_NONCHROMEOS_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_NONCHROMEOS_H_
7 7
8 #include "chrome/browser/extensions/api/input_ime/input_ime_event_router_base.h" 8 #include "chrome/browser/extensions/api/input_ime/input_ime_event_router_base.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "extensions/browser/extension_function.h" 10 #include "extensions/browser/extension_function.h"
(...skipping 23 matching lines...) Expand all
34 ~InputImeEventRouter() override; 34 ~InputImeEventRouter() override;
35 35
36 // Gets the input method engine if the extension is active. 36 // Gets the input method engine if the extension is active.
37 input_method::InputMethodEngineBase* GetActiveEngine( 37 input_method::InputMethodEngineBase* GetActiveEngine(
38 const std::string& extension_id) override; 38 const std::string& extension_id) override;
39 39
40 // Actives the extension with new input method engine, and deletes the 40 // Actives the extension with new input method engine, and deletes the
41 // previous engine if another extension was active. 41 // previous engine if another extension was active.
42 void SetActiveEngine(const std::string& extension_id); 42 void SetActiveEngine(const std::string& extension_id);
43 43
44 input_method::InputMethodEngine* active_engine() {
45 return active_engine_;
46 }
47
44 // Deletes the current input method engine of the specific extension. 48 // Deletes the current input method engine of the specific extension.
45 void DeleteInputMethodEngine(const std::string& extension_id); 49 void DeleteInputMethodEngine(const std::string& extension_id);
46 50
47 private: 51 private:
48 // The active input method engine. 52 // The active input method engine.
49 input_method::InputMethodEngine* active_engine_; 53 input_method::InputMethodEngine* active_engine_;
50 54
51 DISALLOW_COPY_AND_ASSIGN(InputImeEventRouter); 55 DISALLOW_COPY_AND_ASSIGN(InputImeEventRouter);
52 }; 56 };
53 57
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 protected: 116 protected:
113 ~InputImeDeactivateFunction() override {} 117 ~InputImeDeactivateFunction() override {}
114 118
115 // UIThreadExtensionFunction: 119 // UIThreadExtensionFunction:
116 ResponseAction Run() override; 120 ResponseAction Run() override;
117 }; 121 };
118 122
119 } // namespace extensions 123 } // namespace extensions
120 124
121 #endif // CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_NONCHROMEOS_H_ 125 #endif // CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_NONCHROMEOS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698