OLD | NEW |
---|---|
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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
369 | 369 |
370 virtual void GetCurrentIMEProperties( | 370 virtual void GetCurrentIMEProperties( |
371 ash::IMEPropertyInfoList* list) OVERRIDE { | 371 ash::IMEPropertyInfoList* list) OVERRIDE { |
372 input_method::InputMethodManager* manager = | 372 input_method::InputMethodManager* manager = |
373 input_method::InputMethodManager::GetInstance(); | 373 input_method::InputMethodManager::GetInstance(); |
374 input_method::InputMethodUtil* util = manager->GetInputMethodUtil(); | 374 input_method::InputMethodUtil* util = manager->GetInputMethodUtil(); |
375 input_method::InputMethodPropertyList properties = | 375 input_method::InputMethodPropertyList properties = |
376 manager->GetCurrentInputMethodProperties(); | 376 manager->GetCurrentInputMethodProperties(); |
377 for (size_t i = 0; i < properties.size(); ++i) { | 377 for (size_t i = 0; i < properties.size(); ++i) { |
378 ash::IMEPropertyInfo property; | 378 ash::IMEPropertyInfo property; |
379 // Do not show the item not in the selection item. | |
380 if (!properties[i].is_selection_item) | |
381 continue; | |
382 property.key = properties[i].key; | 379 property.key = properties[i].key; |
383 property.name = util->TranslateString(properties[i].label); | 380 property.name = util->TranslateString(properties[i].label); |
384 property.selected = properties[i].is_selection_item_checked; | 381 property.selected = properties[i].is_selection_item_checked; |
385 list->push_back(property); | 382 list->push_back(property); |
386 } | 383 } |
387 } | 384 } |
388 | 385 |
389 virtual void SwitchIME(const std::string& ime_id) OVERRIDE { | 386 virtual void SwitchIME(const std::string& ime_id) OVERRIDE { |
390 input_method::InputMethodManager::GetInstance()->ChangeInputMethod(ime_id); | 387 input_method::InputMethodManager::GetInstance()->ChangeInputMethod(ime_id); |
391 } | 388 } |
392 | 389 |
393 virtual void ActivateIMEProperty(const std::string& key) OVERRIDE { | 390 virtual void ActivateIMEProperty(const std::string& key) OVERRIDE { |
394 input_method::InputMethodManager::GetInstance()->SetImePropertyActivated( | 391 input_method::InputMethodManager::GetInstance()->SetImePropertyActivated( |
395 key, true); | 392 key, true); |
Yusuke Sato
2012/04/06 09:31:42
I think the old status area implementation sends f
Jun Mukai
2012/04/09 01:56:23
You're right. Fixed the code around here.
| |
396 } | 393 } |
397 | 394 |
398 virtual void GetMostRelevantNetworkIcon(ash::NetworkIconInfo* info, | 395 virtual void GetMostRelevantNetworkIcon(ash::NetworkIconInfo* info, |
399 bool dark) OVERRIDE { | 396 bool dark) OVERRIDE { |
400 NetworkLibrary* crosnet = CrosLibrary::Get()->GetNetworkLibrary(); | 397 NetworkLibrary* crosnet = CrosLibrary::Get()->GetNetworkLibrary(); |
401 info->image = !dark ? network_icon_->GetIconAndText(&info->description) : | 398 info->image = !dark ? network_icon_->GetIconAndText(&info->description) : |
402 network_icon_dark_->GetIconAndText(&info->description); | 399 network_icon_dark_->GetIconAndText(&info->description); |
403 info->tray_icon_visible = | 400 info->tray_icon_visible = |
404 ShouldShowNetworkIconInTray(crosnet->connected_network()); | 401 ShouldShowNetworkIconInTray(crosnet->connected_network()); |
405 } | 402 } |
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
969 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); | 966 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); |
970 }; | 967 }; |
971 | 968 |
972 } // namespace | 969 } // namespace |
973 | 970 |
974 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) { | 971 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) { |
975 return new chromeos::SystemTrayDelegate(tray); | 972 return new chromeos::SystemTrayDelegate(tray); |
976 } | 973 } |
977 | 974 |
978 } // namespace chromeos | 975 } // namespace chromeos |
OLD | NEW |