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

Side by Side Diff: chrome/browser/chromeos/input_method/input_method_manager_impl.h

Issue 169033003: try 3 of: Split out InputMethodMenuManager from InputMethodManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: re-uploaded with the fix Created 6 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 | Annotate | Revision Log
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_CHROMEOS_INPUT_METHOD_INPUT_METHOD_MANAGER_IMPL_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_MANAGER_IMPL_H_
6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_MANAGER_IMPL_H_ 6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_MANAGER_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 virtual const InputMethodDescriptor* GetInputMethodFromId( 60 virtual const InputMethodDescriptor* GetInputMethodFromId(
61 const std::string& input_method_id) const OVERRIDE; 61 const std::string& input_method_id) const OVERRIDE;
62 virtual void EnableLoginLayouts( 62 virtual void EnableLoginLayouts(
63 const std::string& language_code, 63 const std::string& language_code,
64 const std::vector<std::string>& initial_layouts) OVERRIDE; 64 const std::vector<std::string>& initial_layouts) OVERRIDE;
65 virtual bool ReplaceEnabledInputMethods( 65 virtual bool ReplaceEnabledInputMethods(
66 const std::vector<std::string>& new_active_input_method_ids) OVERRIDE; 66 const std::vector<std::string>& new_active_input_method_ids) OVERRIDE;
67 virtual bool EnableInputMethod(const std::string& new_active_input_method_id) 67 virtual bool EnableInputMethod(const std::string& new_active_input_method_id)
68 OVERRIDE; 68 OVERRIDE;
69 virtual void ChangeInputMethod(const std::string& input_method_id) OVERRIDE; 69 virtual void ChangeInputMethod(const std::string& input_method_id) OVERRIDE;
70 virtual void ActivateInputMethodProperty(const std::string& key) OVERRIDE; 70 virtual void ActivateInputMethodMenuItem(const std::string& key) OVERRIDE;
71 virtual void AddInputMethodExtension( 71 virtual void AddInputMethodExtension(
72 const std::string& id, 72 const std::string& id,
73 InputMethodEngineInterface* instance) OVERRIDE; 73 InputMethodEngineInterface* instance) OVERRIDE;
74 virtual void RemoveInputMethodExtension(const std::string& id) OVERRIDE; 74 virtual void RemoveInputMethodExtension(const std::string& id) OVERRIDE;
75 virtual void GetInputMethodExtensions( 75 virtual void GetInputMethodExtensions(
76 InputMethodDescriptors* result) OVERRIDE; 76 InputMethodDescriptors* result) OVERRIDE;
77 virtual void SetEnabledExtensionImes(std::vector<std::string>* ids) OVERRIDE; 77 virtual void SetEnabledExtensionImes(std::vector<std::string>* ids) OVERRIDE;
78 virtual void SetInputMethodLoginDefault() OVERRIDE; 78 virtual void SetInputMethodLoginDefault() OVERRIDE;
79 virtual bool SwitchToNextInputMethod() OVERRIDE; 79 virtual bool SwitchToNextInputMethod() OVERRIDE;
80 virtual bool SwitchToPreviousInputMethod( 80 virtual bool SwitchToPreviousInputMethod(
81 const ui::Accelerator& accelerator) OVERRIDE; 81 const ui::Accelerator& accelerator) OVERRIDE;
82 virtual bool SwitchInputMethod(const ui::Accelerator& accelerator) OVERRIDE; 82 virtual bool SwitchInputMethod(const ui::Accelerator& accelerator) OVERRIDE;
83 virtual InputMethodDescriptor GetCurrentInputMethod() const OVERRIDE; 83 virtual InputMethodDescriptor GetCurrentInputMethod() const OVERRIDE;
84 virtual InputMethodPropertyList
85 GetCurrentInputMethodProperties() const OVERRIDE;
86 virtual void SetCurrentInputMethodProperties(
87 const InputMethodPropertyList& property_list) OVERRIDE;
88 84
89 virtual XKeyboard* GetXKeyboard() OVERRIDE; 85 virtual XKeyboard* GetXKeyboard() OVERRIDE;
90 virtual InputMethodUtil* GetInputMethodUtil() OVERRIDE; 86 virtual InputMethodUtil* GetInputMethodUtil() OVERRIDE;
91 virtual ComponentExtensionIMEManager* 87 virtual ComponentExtensionIMEManager*
92 GetComponentExtensionIMEManager() OVERRIDE; 88 GetComponentExtensionIMEManager() OVERRIDE;
93 virtual bool IsLoginKeyboard(const std::string& layout) const OVERRIDE; 89 virtual bool IsLoginKeyboard(const std::string& layout) const OVERRIDE;
94 90
95 // Sets |candidate_window_controller_|. 91 // Sets |candidate_window_controller_|.
96 void SetCandidateWindowControllerForTesting( 92 void SetCandidateWindowControllerForTesting(
97 CandidateWindowController* candidate_window_controller); 93 CandidateWindowController* candidate_window_controller);
98 // Sets |xkeyboard_|. 94 // Sets |xkeyboard_|.
99 void SetXKeyboardForTesting(XKeyboard* xkeyboard); 95 void SetXKeyboardForTesting(XKeyboard* xkeyboard);
100 // Initialize |component_extension_manager_|. 96 // Initialize |component_extension_manager_|.
101 void InitializeComponentExtensionForTesting( 97 void InitializeComponentExtensionForTesting(
102 scoped_ptr<ComponentExtensionIMEManagerDelegate> delegate); 98 scoped_ptr<ComponentExtensionIMEManagerDelegate> delegate);
103 99
104 private: 100 private:
105 // Notifies observers that the property list is updated.
106 void PropertyChanged();
107
108 // CandidateWindowController::Observer overrides: 101 // CandidateWindowController::Observer overrides:
109 virtual void CandidateClicked(int index) OVERRIDE; 102 virtual void CandidateClicked(int index) OVERRIDE;
110 virtual void CandidateWindowOpened() OVERRIDE; 103 virtual void CandidateWindowOpened() OVERRIDE;
111 virtual void CandidateWindowClosed() OVERRIDE; 104 virtual void CandidateWindowClosed() OVERRIDE;
112 105
113 // Temporarily deactivates all input methods (e.g. Chinese, Japanese, Arabic) 106 // Temporarily deactivates all input methods (e.g. Chinese, Japanese, Arabic)
114 // since they are not necessary to input a login password. Users are still 107 // since they are not necessary to input a login password. Users are still
115 // able to use/switch active keyboard layouts (e.g. US qwerty, US dvorak, 108 // able to use/switch active keyboard layouts (e.g. US qwerty, US dvorak,
116 // French). 109 // French).
117 void OnScreenLocked(); 110 void OnScreenLocked();
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 // |current_input_method_|, and |active_input_method_ids_| above are copied 176 // |current_input_method_|, and |active_input_method_ids_| above are copied
184 // to these "saved" variables. 177 // to these "saved" variables.
185 InputMethodDescriptor saved_previous_input_method_; 178 InputMethodDescriptor saved_previous_input_method_;
186 InputMethodDescriptor saved_current_input_method_; 179 InputMethodDescriptor saved_current_input_method_;
187 std::vector<std::string> saved_active_input_method_ids_; 180 std::vector<std::string> saved_active_input_method_ids_;
188 181
189 // Extra input methods that have been explicitly added to the menu, such as 182 // Extra input methods that have been explicitly added to the menu, such as
190 // those created by extension. 183 // those created by extension.
191 std::map<std::string, InputMethodDescriptor> extra_input_methods_; 184 std::map<std::string, InputMethodDescriptor> extra_input_methods_;
192 185
193 // Property list of the input method. This is set by extension IMEs.
194 InputMethodPropertyList property_list_;
195
196 // The candidate window. This will be deleted when the APP_TERMINATING 186 // The candidate window. This will be deleted when the APP_TERMINATING
197 // message is sent. 187 // message is sent.
198 scoped_ptr<CandidateWindowController> candidate_window_controller_; 188 scoped_ptr<CandidateWindowController> candidate_window_controller_;
199 189
200 // The object which can create an InputMethodDescriptor object. 190 // The object which can create an InputMethodDescriptor object.
201 InputMethodWhitelist whitelist_; 191 InputMethodWhitelist whitelist_;
202 192
203 // An object which provides miscellaneous input method utility functions. Note 193 // An object which provides miscellaneous input method utility functions. Note
204 // that |util_| is required to initialize |xkeyboard_|. 194 // that |util_| is required to initialize |xkeyboard_|.
205 InputMethodUtil util_; 195 InputMethodUtil util_;
(...skipping 11 matching lines...) Expand all
217 207
218 base::WeakPtrFactory<InputMethodManagerImpl> weak_ptr_factory_; 208 base::WeakPtrFactory<InputMethodManagerImpl> weak_ptr_factory_;
219 209
220 DISALLOW_COPY_AND_ASSIGN(InputMethodManagerImpl); 210 DISALLOW_COPY_AND_ASSIGN(InputMethodManagerImpl);
221 }; 211 };
222 212
223 } // namespace input_method 213 } // namespace input_method
224 } // namespace chromeos 214 } // namespace chromeos
225 215
226 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_MANAGER_IMPL_H_ 216 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_MANAGER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698