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

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

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

Powered by Google App Engine
This is Rietveld 408576698