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

Side by Side Diff: chrome/browser/chromeos/status/input_method_menu.h

Issue 9651023: Get the ProfileService object after NOTIFICATION_SESSION_STARTED is sent to Chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/status/input_method_menu.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_STATUS_INPUT_METHOD_MENU_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_STATUS_INPUT_METHOD_MENU_H_
6 #define CHROME_BROWSER_CHROMEOS_STATUS_INPUT_METHOD_MENU_H_ 6 #define CHROME_BROWSER_CHROMEOS_STATUS_INPUT_METHOD_MENU_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 26 matching lines...) Expand all
37 // Since the class provides the views::MenuButtonDelegate interface, it's easy 37 // Since the class provides the views::MenuButtonDelegate interface, it's easy
38 // to create a button widget (e.g. views::MenuButton, StatusAreaButton) which 38 // to create a button widget (e.g. views::MenuButton, StatusAreaButton) which
39 // shows the dropdown menu on click. 39 // shows the dropdown menu on click.
40 class InputMethodMenu 40 class InputMethodMenu
41 : public views::MenuButtonDelegate, 41 : public views::MenuButtonDelegate,
42 public ui::MenuModel, 42 public ui::MenuModel,
43 public input_method::InputMethodManager::Observer, 43 public input_method::InputMethodManager::Observer,
44 public input_method::InputMethodManager::PreferenceObserver, 44 public input_method::InputMethodManager::PreferenceObserver,
45 public content::NotificationObserver { 45 public content::NotificationObserver {
46 public: 46 public:
47 InputMethodMenu(PrefService* pref_service, 47 InputMethodMenu();
48 bool for_out_of_box_experience_dialog);
49 virtual ~InputMethodMenu(); 48 virtual ~InputMethodMenu();
50 49
51 // ui::MenuModel implementation. 50 // ui::MenuModel implementation.
52 virtual bool HasIcons() const OVERRIDE; 51 virtual bool HasIcons() const OVERRIDE;
53 virtual int GetItemCount() const OVERRIDE; 52 virtual int GetItemCount() const OVERRIDE;
54 virtual ui::MenuModel::ItemType GetTypeAt(int index) const OVERRIDE; 53 virtual ui::MenuModel::ItemType GetTypeAt(int index) const OVERRIDE;
55 virtual int GetCommandIdAt(int index) const OVERRIDE; 54 virtual int GetCommandIdAt(int index) const OVERRIDE;
56 virtual string16 GetLabelAt(int index) const OVERRIDE; 55 virtual string16 GetLabelAt(int index) const OVERRIDE;
57 virtual bool IsItemDynamicAt(int index) const OVERRIDE; 56 virtual bool IsItemDynamicAt(int index) const OVERRIDE;
58 virtual bool GetAcceleratorAt(int index, 57 virtual bool GetAcceleratorAt(int index,
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 scoped_ptr<ui::SimpleMenuModel> model_; 189 scoped_ptr<ui::SimpleMenuModel> model_;
191 scoped_ptr<views::MenuModelAdapter> input_method_menu_delegate_; 190 scoped_ptr<views::MenuModelAdapter> input_method_menu_delegate_;
192 views::MenuItemView* input_method_menu_; 191 views::MenuItemView* input_method_menu_;
193 scoped_ptr<views::MenuRunner> input_method_menu_runner_; 192 scoped_ptr<views::MenuRunner> input_method_menu_runner_;
194 193
195 int minimum_input_method_menu_width_; 194 int minimum_input_method_menu_width_;
196 195
197 // Menu alignment (default TOPRIGHT). 196 // Menu alignment (default TOPRIGHT).
198 views::MenuItemView::AnchorPosition menu_alignment_; 197 views::MenuItemView::AnchorPosition menu_alignment_;
199 198
200 PrefService* pref_service_;
201 content::NotificationRegistrar registrar_; 199 content::NotificationRegistrar registrar_;
202 200
203 // true if the menu is for a dialog in OOBE screen. In the dialog, we don't
204 // use radio buttons.
205 const bool for_out_of_box_experience_dialog_;
206
207 DISALLOW_COPY_AND_ASSIGN(InputMethodMenu); 201 DISALLOW_COPY_AND_ASSIGN(InputMethodMenu);
208 }; 202 };
209 203
210 } // namespace chromeos 204 } // namespace chromeos
211 205
212 #endif // CHROME_BROWSER_CHROMEOS_STATUS_INPUT_METHOD_MENU_H_ 206 #endif // CHROME_BROWSER_CHROMEOS_STATUS_INPUT_METHOD_MENU_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/status/input_method_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698