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

Side by Side Diff: chrome/browser/chromeos/status/input_method_menu_button.cc

Issue 8509027: Add status area to Aura builds. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move status area view ids back to chromeos Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "chrome/browser/chromeos/status/input_method_menu_button.h" 5 #include "chrome/browser/chromeos/status/input_method_menu_button.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/chromeos/input_method/input_method_manager.h" 10 #include "chrome/browser/chromeos/input_method/input_method_manager.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 } 135 }
136 136
137 // TODO(yusukes): For a window which isn't on top, probably it's better to 137 // TODO(yusukes): For a window which isn't on top, probably it's better to
138 // update the texts when the window gets activated because SetTooltipText() 138 // update the texts when the window gets activated because SetTooltipText()
139 // and SetText() are also expensive. 139 // and SetText() are also expensive.
140 } 140 }
141 141
142 void InputMethodMenuButton::OpenConfigUI() { 142 void InputMethodMenuButton::OpenConfigUI() {
143 // Ask browser to open the WebUI page. 143 // Ask browser to open the WebUI page.
144 delegate()->ExecuteStatusAreaCommand( 144 delegate()->ExecuteStatusAreaCommand(
145 this, StatusAreaViewChromeos::SHOW_LANGUAGE_OPTIONS); 145 this, StatusAreaButton::Delegate::SHOW_LANGUAGE_OPTIONS);
146 } 146 }
147 147
148 bool InputMethodMenuButton::ShouldSupportConfigUI() { 148 bool InputMethodMenuButton::ShouldSupportConfigUI() {
149 return delegate()->ShouldExecuteStatusAreaCommand( 149 return delegate()->ShouldExecuteStatusAreaCommand(
150 this, StatusAreaViewChromeos::SHOW_LANGUAGE_OPTIONS); 150 this, StatusAreaButton::Delegate::SHOW_LANGUAGE_OPTIONS);
151 } 151 }
152 152
153 void InputMethodMenuButton::UpdateUIFromCurrentInputMethod() { 153 void InputMethodMenuButton::UpdateUIFromCurrentInputMethod() {
154 input_method::InputMethodManager* input_method_manager = 154 input_method::InputMethodManager* input_method_manager =
155 input_method::InputMethodManager::GetInstance(); 155 input_method::InputMethodManager::GetInstance();
156 const input_method::InputMethodDescriptor& input_method = 156 const input_method::InputMethodDescriptor& input_method =
157 input_method_manager->current_input_method(); 157 input_method_manager->current_input_method();
158 const string16 name = InputMethodMenu::GetTextForIndicator(input_method); 158 const string16 name = InputMethodMenu::GetTextForIndicator(input_method);
159 const string16 tooltip = InputMethodMenu::GetTextForMenu(input_method); 159 const string16 tooltip = InputMethodMenu::GetTextForMenu(input_method);
160 const size_t num_active_input_methods = 160 const size_t num_active_input_methods =
161 input_method_manager->GetNumActiveInputMethods(); 161 input_method_manager->GetNumActiveInputMethods();
162 UpdateUI(input_method.id(), name, tooltip, num_active_input_methods); 162 UpdateUI(input_method.id(), name, tooltip, num_active_input_methods);
163 } 163 }
164 164
165 } // namespace chromeos 165 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/status/clock_menu_button.cc ('k') | chrome/browser/chromeos/status/memory_menu_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698