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

Side by Side Diff: trunk/src/ash/ime/input_method_menu_manager.h

Issue 165453002: Revert 251164 "Split out InputMethodMenuManager from InputMethod..." (Closed) Base URL: svn://svn.chromium.org/chrome/
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
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ash/ash_export.h"
6
7 #include "ash/ime/input_method_menu_item.h"
8 #include "base/observer_list.h"
9
10 #ifndef ASH_IME_INPUT_METHOD_MENU_MANAGER_H_
11 #define ASH_IME_INPUT_METHOD_MENU_MANAGER_H_
12
13 namespace ash {
14 namespace ime {
15
16 class ASH_EXPORT InputMethodMenuManager {
17 public:
18 class Observer {
19 public:
20 virtual ~Observer() {}
21
22 // Called when the list of menu items is changed.
23 virtual void InputMethodMenuItemChanged(
24 InputMethodMenuManager* manager) = 0;
25 };
26
27 ~InputMethodMenuManager();
28
29 void AddObserver(Observer* observer);
30 void RemoveObserver(Observer* observer);
31
32 static InputMethodMenuManager* Get();
33
34 // Create the global instance.
35 static void Initialize();
36 // Destroy the global instance.
37 static void Shutdown();
38
39 // Sets the list of input method menu items. The list could be empty().
40 void SetCurrentInputMethodMenuItemList(
41 const InputMethodMenuItemList& menu_list);
42
43 // Gets the list of input method menu items. The list could be empty().
44 InputMethodMenuItemList GetCurrentInputMethodMenuItemList() const;
45
46 // True if the key exists in the menu_list_.
47 bool HasInputMethodMenuItemForKey(const std::string& key) const;
48
49 private:
50 InputMethodMenuManager();
51
52 // Menu item list of the input method. This is set by extension IMEs.
53 InputMethodMenuItemList menu_list_;
54
55 // Observers who will be notified when menu changes.
56 ObserverList<Observer> observers_;
57
58 DISALLOW_COPY_AND_ASSIGN(InputMethodMenuManager);
59 };
60
61 } // namespace ime
62 } // namespace ash
63
64 #endif // ASH_IME_INPUT_METHOD_MENU_MANAGER_H_
OLDNEW
« no previous file with comments | « trunk/src/ash/ime/input_method_menu_item_unittest.cc ('k') | trunk/src/ash/ime/input_method_menu_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698