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

Side by Side Diff: ui/base/ime/chromeos/input_method_manager.h

Issue 1523593002: Add an option in language settings for activating the IME menu. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 (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 UI_BASE_IME_CHROMEOS_INPUT_METHOD_MANAGER_H_ 5 #ifndef UI_BASE_IME_CHROMEOS_INPUT_METHOD_MANAGER_H_
6 #define UI_BASE_IME_CHROMEOS_INPUT_METHOD_MANAGER_H_ 6 #define UI_BASE_IME_CHROMEOS_INPUT_METHOD_MANAGER_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 // keyboard is used, since it controls its own candidate window. 60 // keyboard is used, since it controls its own candidate window.
61 class CandidateWindowObserver { 61 class CandidateWindowObserver {
62 public: 62 public:
63 virtual ~CandidateWindowObserver() {} 63 virtual ~CandidateWindowObserver() {}
64 // Called when the candidate window is opened. 64 // Called when the candidate window is opened.
65 virtual void CandidateWindowOpened(InputMethodManager* manager) = 0; 65 virtual void CandidateWindowOpened(InputMethodManager* manager) = 0;
66 // Called when the candidate window is closed. 66 // Called when the candidate window is closed.
67 virtual void CandidateWindowClosed(InputMethodManager* manager) = 0; 67 virtual void CandidateWindowClosed(InputMethodManager* manager) = 0;
68 }; 68 };
69 69
70 // ImeMenuObserver is notified of events related to the IME menu on the system
71 // tray.
72 class ImeMenuObserver {
73 public:
74 virtual ~ImeMenuObserver() {}
75 // Called when the current input method is changed. |show_message|
76 // indicates whether the user should be notified of this change.
77 virtual void ImeMenuActivated(InputMethodManager* manager) = 0;
78 virtual void ImeMenuDeactivated(InputMethodManager* manager) = 0;
79 };
80
70 class State : public base::RefCounted<InputMethodManager::State> { 81 class State : public base::RefCounted<InputMethodManager::State> {
71 public: 82 public:
72 // Returns a copy of state. 83 // Returns a copy of state.
73 virtual scoped_refptr<State> Clone() const = 0; 84 virtual scoped_refptr<State> Clone() const = 0;
74 85
75 // Adds an input method extension. This function does not takes ownership of 86 // Adds an input method extension. This function does not takes ownership of
76 // |instance|. 87 // |instance|.
77 virtual void AddInputMethodExtension( 88 virtual void AddInputMethodExtension(
78 const std::string& extension_id, 89 const std::string& extension_id,
79 const InputMethodDescriptors& descriptors, 90 const InputMethodDescriptors& descriptors,
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 static UI_BASE_IME_EXPORT void Shutdown(); 205 static UI_BASE_IME_EXPORT void Shutdown();
195 206
196 // Get the current UI session state (e.g. login screen, lock screen, etc.). 207 // Get the current UI session state (e.g. login screen, lock screen, etc.).
197 virtual UISessionState GetUISessionState() = 0; 208 virtual UISessionState GetUISessionState() = 0;
198 209
199 // Adds an observer to receive notifications of input method related 210 // Adds an observer to receive notifications of input method related
200 // changes as desribed in the Observer class above. 211 // changes as desribed in the Observer class above.
201 virtual void AddObserver(Observer* observer) = 0; 212 virtual void AddObserver(Observer* observer) = 0;
202 virtual void AddCandidateWindowObserver( 213 virtual void AddCandidateWindowObserver(
203 CandidateWindowObserver* observer) = 0; 214 CandidateWindowObserver* observer) = 0;
215 virtual void AddImeMenuObserver(ImeMenuObserver* observer) = 0;
204 virtual void RemoveObserver(Observer* observer) = 0; 216 virtual void RemoveObserver(Observer* observer) = 0;
205 virtual void RemoveCandidateWindowObserver( 217 virtual void RemoveCandidateWindowObserver(
206 CandidateWindowObserver* observer) = 0; 218 CandidateWindowObserver* observer) = 0;
219 virtual void RemoveImeMenuObserver(ImeMenuObserver* observer) = 0;
207 220
208 // Returns all input methods that are supported, including ones not active. 221 // Returns all input methods that are supported, including ones not active.
209 // This function never returns NULL. Note that input method extensions are NOT 222 // This function never returns NULL. Note that input method extensions are NOT
210 // included in the result. 223 // included in the result.
211 virtual scoped_ptr<InputMethodDescriptors> 224 virtual scoped_ptr<InputMethodDescriptors>
212 GetSupportedInputMethods() const = 0; 225 GetSupportedInputMethods() const = 0;
213 226
214 // Activates the input method property specified by the |key|. 227 // Activates the input method property specified by the |key|.
215 virtual void ActivateInputMethodMenuItem(const std::string& key) = 0; 228 virtual void ActivateInputMethodMenuItem(const std::string& key) = 0;
216 229
(...skipping 19 matching lines...) Expand all
236 std::vector<std::string>* input_method_ids) = 0; 249 std::vector<std::string>* input_method_ids) = 0;
237 250
238 // Returns new empty state for the |profile|. 251 // Returns new empty state for the |profile|.
239 virtual scoped_refptr<State> CreateNewState(Profile* profile) = 0; 252 virtual scoped_refptr<State> CreateNewState(Profile* profile) = 0;
240 253
241 // Returns active state. 254 // Returns active state.
242 virtual scoped_refptr<InputMethodManager::State> GetActiveIMEState() = 0; 255 virtual scoped_refptr<InputMethodManager::State> GetActiveIMEState() = 0;
243 256
244 // Replaces active state. 257 // Replaces active state.
245 virtual void SetState(scoped_refptr<State> state) = 0; 258 virtual void SetState(scoped_refptr<State> state) = 0;
259
260 // Acitvated the IME Menu.
261 virtual void ImeMenuActivated() = 0;
262
263 // Deactivated the IME Menu.
264 virtual void ImeMenuDeactivated() = 0;
246 }; 265 };
247 266
248 } // namespace input_method 267 } // namespace input_method
249 } // namespace chromeos 268 } // namespace chromeos
250 269
251 #endif // UI_BASE_IME_CHROMEOS_INPUT_METHOD_MANAGER_H_ 270 #endif // UI_BASE_IME_CHROMEOS_INPUT_METHOD_MANAGER_H_
OLDNEW
« chrome/common/pref_names.cc ('K') | « tools/metrics/histograms/histograms.xml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698