summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/status/input_method_menu.h
diff options
context:
space:
mode:
authoryusukes@google.com <yusukes@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-04 06:40:44 +0000
committeryusukes@google.com <yusukes@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-04 06:40:44 +0000
commit5e3634aab3695aa484ef5e2a4e496aad8966ed35 (patch)
tree087d05eb1e6f00dfb686485bcfbd03a80acc0b45 /chrome/browser/chromeos/status/input_method_menu.h
parentfb078af51276e07e9747c678be7438be7ee38c0e (diff)
downloadchromium_src-5e3634aab3695aa484ef5e2a4e496aad8966ed35.zip
chromium_src-5e3634aab3695aa484ef5e2a4e496aad8966ed35.tar.gz
chromium_src-5e3634aab3695aa484ef5e2a4e496aad8966ed35.tar.bz2
* Remove all Preference code from InputMethodMenu. Always handle IME preferences in BrowserStateMonitor and Preferences regardless of the uber tray flag.
* Remove PreferenceObserver from InputMethodManager. * Use Observer instead of PreferenceObserver in BrowserStateMonitor. BUG=chromiun-os:28297 TEST=manual Review URL: https://chromiumcodereview.appspot.com/9838095 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130564 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/status/input_method_menu.h')
-rw-r--r--chrome/browser/chromeos/status/input_method_menu.h42
1 files changed, 4 insertions, 38 deletions
diff --git a/chrome/browser/chromeos/status/input_method_menu.h b/chrome/browser/chromeos/status/input_method_menu.h
index 93c789b..3658a20 100644
--- a/chrome/browser/chromeos/status/input_method_menu.h
+++ b/chrome/browser/chromeos/status/input_method_menu.h
@@ -10,10 +10,6 @@
#include "base/compiler_specific.h"
#include "chrome/browser/chromeos/input_method/input_method_manager.h"
-#include "chrome/browser/prefs/pref_member.h"
-#include "content/public/browser/notification_observer.h"
-#include "content/public/browser/notification_registrar.h"
-#include "content/public/browser/notification_types.h"
#include "ui/base/models/menu_model.h"
#include "ui/views/controls/button/menu_button_listener.h"
#include "ui/views/controls/menu/menu_item_view.h"
@@ -40,9 +36,7 @@ namespace chromeos {
class InputMethodMenu
: public views::MenuButtonListener,
public ui::MenuModel,
- public input_method::InputMethodManager::Observer,
- public input_method::InputMethodManager::PreferenceObserver,
- public content::NotificationObserver {
+ public input_method::InputMethodManager::Observer {
public:
InputMethodMenu();
virtual ~InputMethodMenu();
@@ -85,19 +79,6 @@ class InputMethodMenu
input_method::InputMethodManager* manager,
const input_method::InputMethodPropertyList& properties) OVERRIDE;
- // InputMethodManager::PreferenceObserver implementation.
- virtual void PreferenceUpdateNeeded(
- input_method::InputMethodManager* manager,
- const input_method::InputMethodDescriptor& previous_input_method,
- const input_method::InputMethodDescriptor& current_input_method) OVERRIDE;
- virtual void FirstObserverIsAdded(
- input_method::InputMethodManager* manager) OVERRIDE;
-
- // content::NotificationObserver implementation.
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) OVERRIDE;
-
// Specify menu alignment (default TOPRIGHT).
void set_menu_alignment(views::MenuItemView::AnchorPosition menu_alignment) {
menu_alignment_ = menu_alignment;
@@ -109,9 +90,6 @@ class InputMethodMenu
// Rebuilds menu model.
void PrepareMenuModel();
- // Registers input method preferences for the login screen.
- static void RegisterPrefs(PrefService* local_state);
-
// Returns a string for the drop-down menu and the tooltip for the indicator.
// The method is public for unit tests.
static string16 GetTextForMenu(
@@ -160,23 +138,13 @@ class InputMethodMenu
// item.
bool IndexPointsToConfigureImeMenuItem(int index) const;
- // Add / Remove InputMethodManager observers.
- void AddObservers();
- void RemoveObservers();
-
- // Initializes objects for reading/writing Chrome prefs.
- void InitializePrefMembers();
-
- bool initialized_prefs_;
- bool initialized_observers_;
+ // Add / Remove InputMethodManager observer.
+ void AddObserver();
+ void RemoveObserver();
// The current input method list.
scoped_ptr<input_method::InputMethodDescriptors> input_method_descriptors_;
- // Objects for reading/writing the Chrome prefs.
- StringPrefMember previous_input_method_pref_;
- StringPrefMember current_input_method_pref_;
-
// We borrow ui::SimpleMenuModel implementation to maintain the current
// content of the pop-up menu. The ui::MenuModel is implemented using this
// |model_|. The MenuModelAdapter wraps the model with the
@@ -191,8 +159,6 @@ class InputMethodMenu
// Menu alignment (default TOPRIGHT).
views::MenuItemView::AnchorPosition menu_alignment_;
- content::NotificationRegistrar registrar_;
-
DISALLOW_COPY_AND_ASSIGN(InputMethodMenu);
};