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

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 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 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 SetProfile(ProfileManager::GetDefaultProfile()); 835 SetProfile(ProfileManager::GetDefaultProfile());
837 break; 836 break;
838 } 837 }
839 default: 838 default:
840 NOTREACHED(); 839 NOTREACHED();
841 } 840 }
842 } 841 }
843 842
844 // Overridden from InputMethodManager::Observer. 843 // Overridden from InputMethodManager::Observer.
845 virtual void InputMethodChanged( 844 virtual void InputMethodChanged(
846 input_method::InputMethodManager* manager, 845 input_method::InputMethodManager* manager) OVERRIDE {
847 const input_method::InputMethodDescriptor& current_method,
848 size_t num_active_input_methods) OVERRIDE {
849 NotifyRefreshIME(); 846 NotifyRefreshIME();
850 } 847 }
851 848
852 virtual void ActiveInputMethodsChanged( 849 virtual void InputMethodPropertyChanged(
853 input_method::InputMethodManager* manager, 850 input_method::InputMethodManager* manager) OVERRIDE {
854 const input_method::InputMethodDescriptor& current_input_method,
855 size_t num_active_input_methods) OVERRIDE {
856 NotifyRefreshIME(); 851 NotifyRefreshIME();
857 } 852 }
858 853
859 virtual void PropertyListChanged(
860 input_method::InputMethodManager* manager,
861 const input_method::InputMethodPropertyList& properties) OVERRIDE {
862 NotifyRefreshIME();
863 }
864
865 // Overridden from system::TimezoneSettings::Observer. 854 // Overridden from system::TimezoneSettings::Observer.
866 virtual void TimezoneChanged(const icu::TimeZone& timezone) OVERRIDE { 855 virtual void TimezoneChanged(const icu::TimeZone& timezone) OVERRIDE {
867 NotifyRefreshClock(); 856 NotifyRefreshClock();
868 } 857 }
869 858
870 // Overridden from BluetoothAdapter::Observer. 859 // Overridden from BluetoothAdapter::Observer.
871 virtual void AdapterPresentChanged(BluetoothAdapter* adapter, 860 virtual void AdapterPresentChanged(BluetoothAdapter* adapter,
872 bool present) OVERRIDE { 861 bool present) OVERRIDE {
873 NotifyRefreshBluetooth(); 862 NotifyRefreshBluetooth();
874 } 863 }
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
969 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); 958 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate);
970 }; 959 };
971 960
972 } // namespace 961 } // namespace
973 962
974 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) { 963 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) {
975 return new chromeos::SystemTrayDelegate(tray); 964 return new chromeos::SystemTrayDelegate(tray);
976 } 965 }
977 966
978 } // namespace chromeos 967 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698