| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 info.service_path = network->service_path(); | 77 info.service_path = network->service_path(); |
| 78 info.highlight = network_menu->ShouldHighlightNetwork(network); | 78 info.highlight = network_menu->ShouldHighlightNetwork(network); |
| 79 info.tray_icon_visible = ShouldShowNetworkIconInTray(network); | 79 info.tray_icon_visible = ShouldShowNetworkIconInTray(network); |
| 80 return info; | 80 return info; |
| 81 } | 81 } |
| 82 | 82 |
| 83 void ExtractIMEInfo(const input_method::InputMethodDescriptor& ime, | 83 void ExtractIMEInfo(const input_method::InputMethodDescriptor& ime, |
| 84 const input_method::InputMethodUtil& util, | 84 const input_method::InputMethodUtil& util, |
| 85 ash::IMEInfo* info) { | 85 ash::IMEInfo* info) { |
| 86 info->id = ime.id(); | 86 info->id = ime.id(); |
| 87 std::string name = util.GetInputMethodDisplayNameFromId(info->id); | 87 info->name = util.GetInputMethodLongName(ime); |
| 88 if (name.empty()) { | |
| 89 name = ime.name(); | |
| 90 } | |
| 91 info->name = UTF8ToUTF16(name); | |
| 92 | |
| 93 info->short_name = util.GetInputMethodShortName(ime); | 88 info->short_name = util.GetInputMethodShortName(ime); |
| 94 } | 89 } |
| 95 | 90 |
| 96 | 91 |
| 97 void BluetoothPowerFailure() { | 92 void BluetoothPowerFailure() { |
| 98 // TODO(sad): Show an error bubble? | 93 // TODO(sad): Show an error bubble? |
| 99 } | 94 } |
| 100 | 95 |
| 101 void BluetoothDiscoveryFailure() { | 96 void BluetoothDiscoveryFailure() { |
| 102 // TODO(sad): Show an error bubble? | 97 // TODO(sad): Show an error bubble? |
| (...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 968 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); | 963 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); |
| 969 }; | 964 }; |
| 970 | 965 |
| 971 } // namespace | 966 } // namespace |
| 972 | 967 |
| 973 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) { | 968 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) { |
| 974 return new chromeos::SystemTrayDelegate(tray); | 969 return new chromeos::SystemTrayDelegate(tray); |
| 975 } | 970 } |
| 976 | 971 |
| 977 } // namespace chromeos | 972 } // namespace chromeos |
| OLD | NEW |