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

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 |should_hide_properties_| 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 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 SetProfile(ProfileManager::GetDefaultProfile()); 820 SetProfile(ProfileManager::GetDefaultProfile());
822 break; 821 break;
823 } 822 }
824 default: 823 default:
825 NOTREACHED(); 824 NOTREACHED();
826 } 825 }
827 } 826 }
828 827
829 // Overridden from InputMethodManager::Observer. 828 // Overridden from InputMethodManager::Observer.
830 virtual void InputMethodChanged( 829 virtual void InputMethodChanged(
831 input_method::InputMethodManager* manager, 830 input_method::InputMethodManager* manager) OVERRIDE {
832 const input_method::InputMethodDescriptor& current_method,
833 size_t num_active_input_methods) OVERRIDE {
834 NotifyRefreshIME(); 831 NotifyRefreshIME();
835 } 832 }
836 833
837 virtual void ActiveInputMethodsChanged( 834 virtual void InputMethodPropertyChanged(
838 input_method::InputMethodManager* manager, 835 input_method::InputMethodManager* manager) OVERRIDE {
839 const input_method::InputMethodDescriptor& current_input_method,
840 size_t num_active_input_methods) OVERRIDE {
841 NotifyRefreshIME(); 836 NotifyRefreshIME();
842 } 837 }
843 838
844 virtual void PropertyListChanged(
845 input_method::InputMethodManager* manager,
846 const input_method::InputMethodPropertyList& properties) OVERRIDE {
847 NotifyRefreshIME();
848 }
849
850 // Overridden from system::TimezoneSettings::Observer. 839 // Overridden from system::TimezoneSettings::Observer.
851 virtual void TimezoneChanged(const icu::TimeZone& timezone) OVERRIDE { 840 virtual void TimezoneChanged(const icu::TimeZone& timezone) OVERRIDE {
852 NotifyRefreshClock(); 841 NotifyRefreshClock();
853 } 842 }
854 843
855 // Overridden from BluetoothAdapter::Observer. 844 // Overridden from BluetoothAdapter::Observer.
856 virtual void AdapterPresentChanged(BluetoothAdapter* adapter, 845 virtual void AdapterPresentChanged(BluetoothAdapter* adapter,
857 bool present) OVERRIDE { 846 bool present) OVERRIDE {
858 NotifyRefreshBluetooth(); 847 NotifyRefreshBluetooth();
859 } 848 }
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
953 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); 942 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate);
954 }; 943 };
955 944
956 } // namespace 945 } // namespace
957 946
958 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) { 947 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) {
959 return new chromeos::SystemTrayDelegate(tray); 948 return new chromeos::SystemTrayDelegate(tray);
960 } 949 }
961 950
962 } // namespace chromeos 951 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698