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

Side by Side Diff: chrome/browser/chromeos/system/ash_system_tray_delegate.cc

Issue 9999018: chrome/browser/chromeos/input_method/ refactoring [part 6 of 6] (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, remove preferences.h and language_preference.* from this CL Created 8 years, 8 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
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 #include "chrome/browser/chromeos/system/ash_system_tray_delegate.h" 5 #include "chrome/browser/chromeos/system/ash_system_tray_delegate.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_window_ids.h" 8 #include "ash/shell_window_ids.h"
9 #include "ash/system/audio/audio_observer.h" 9 #include "ash/system/audio/audio_observer.h"
10 #include "ash/system/bluetooth/bluetooth_observer.h" 10 #include "ash/system/bluetooth/bluetooth_observer.h"
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 property.selected = properties[i].is_selection_item_checked; 376 property.selected = properties[i].is_selection_item_checked;
377 property.is_selection = properties[i].is_selection_item; 377 property.is_selection = properties[i].is_selection_item;
378 list->push_back(property); 378 list->push_back(property);
379 } 379 }
380 } 380 }
381 381
382 virtual void SwitchIME(const std::string& ime_id) OVERRIDE { 382 virtual void SwitchIME(const std::string& ime_id) OVERRIDE {
383 input_method::InputMethodManager::GetInstance()->ChangeInputMethod(ime_id); 383 input_method::InputMethodManager::GetInstance()->ChangeInputMethod(ime_id);
384 } 384 }
385 385
386 virtual void ActivateIMEProperty( 386 virtual void ActivateIMEProperty(const std::string& key) OVERRIDE {
387 const std::string& key, bool is_selection) OVERRIDE { 387 input_method::InputMethodManager::GetInstance()->
388 input_method::InputMethodManager::GetInstance()->SetImePropertyActivated( 388 ActivateInputMethodProperty(key);
389 key, is_selection);
390 } 389 }
391 390
392 virtual void GetMostRelevantNetworkIcon(ash::NetworkIconInfo* info, 391 virtual void GetMostRelevantNetworkIcon(ash::NetworkIconInfo* info,
393 bool dark) OVERRIDE { 392 bool dark) OVERRIDE {
394 NetworkLibrary* crosnet = CrosLibrary::Get()->GetNetworkLibrary(); 393 NetworkLibrary* crosnet = CrosLibrary::Get()->GetNetworkLibrary();
395 info->image = !dark ? network_icon_->GetIconAndText(&info->description) : 394 info->image = !dark ? network_icon_->GetIconAndText(&info->description) :
396 network_icon_dark_->GetIconAndText(&info->description); 395 network_icon_dark_->GetIconAndText(&info->description);
397 info->tray_icon_visible = 396 info->tray_icon_visible =
398 ShouldShowNetworkIconInTray(crosnet->connected_network()); 397 ShouldShowNetworkIconInTray(crosnet->connected_network());
399 } 398 }
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 SetProfile(ProfileManager::GetDefaultProfile()); 829 SetProfile(ProfileManager::GetDefaultProfile());
831 break; 830 break;
832 } 831 }
833 default: 832 default:
834 NOTREACHED(); 833 NOTREACHED();
835 } 834 }
836 } 835 }
837 836
838 // Overridden from InputMethodManager::Observer. 837 // Overridden from InputMethodManager::Observer.
839 virtual void InputMethodChanged( 838 virtual void InputMethodChanged(
840 input_method::InputMethodManager* manager, 839 input_method::InputMethodManager* manager) OVERRIDE {
841 const input_method::InputMethodDescriptor& current_method,
842 size_t num_active_input_methods) OVERRIDE {
843 NotifyRefreshIME(); 840 NotifyRefreshIME();
844 } 841 }
845 842
846 virtual void ActiveInputMethodsChanged( 843 virtual void InputMethodPropertyChanged(
847 input_method::InputMethodManager* manager, 844 input_method::InputMethodManager* manager) OVERRIDE {
848 const input_method::InputMethodDescriptor& current_input_method,
849 size_t num_active_input_methods) OVERRIDE {
850 NotifyRefreshIME(); 845 NotifyRefreshIME();
851 } 846 }
852 847
853 virtual void PropertyListChanged(
854 input_method::InputMethodManager* manager,
855 const input_method::InputMethodPropertyList& properties) OVERRIDE {
856 NotifyRefreshIME();
857 }
858
859 // Overridden from system::TimezoneSettings::Observer. 848 // Overridden from system::TimezoneSettings::Observer.
860 virtual void TimezoneChanged(const icu::TimeZone& timezone) OVERRIDE { 849 virtual void TimezoneChanged(const icu::TimeZone& timezone) OVERRIDE {
861 NotifyRefreshClock(); 850 NotifyRefreshClock();
862 } 851 }
863 852
864 // Overridden from BluetoothAdapter::Observer. 853 // Overridden from BluetoothAdapter::Observer.
865 virtual void AdapterPresentChanged(BluetoothAdapter* adapter, 854 virtual void AdapterPresentChanged(BluetoothAdapter* adapter,
866 bool present) OVERRIDE { 855 bool present) OVERRIDE {
867 NotifyRefreshBluetooth(); 856 NotifyRefreshBluetooth();
868 } 857 }
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
963 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); 952 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate);
964 }; 953 };
965 954
966 } // namespace 955 } // namespace
967 956
968 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) { 957 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) {
969 return new chromeos::SystemTrayDelegate(tray); 958 return new chromeos::SystemTrayDelegate(tray);
970 } 959 }
971 960
972 } // namespace chromeos 961 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698