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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 info.service_path = network->service_path(); | 78 info.service_path = network->service_path(); |
79 info.highlight = network_menu->ShouldHighlightNetwork(network); | 79 info.highlight = network_menu->ShouldHighlightNetwork(network); |
80 info.tray_icon_visible = ShouldShowNetworkIconInTray(network); | 80 info.tray_icon_visible = ShouldShowNetworkIconInTray(network); |
81 return info; | 81 return info; |
82 } | 82 } |
83 | 83 |
84 void ExtractIMEInfo(const input_method::InputMethodDescriptor& ime, | 84 void ExtractIMEInfo(const input_method::InputMethodDescriptor& ime, |
85 const input_method::InputMethodUtil& util, | 85 const input_method::InputMethodUtil& util, |
86 ash::IMEInfo* info) { | 86 ash::IMEInfo* info) { |
87 info->id = ime.id(); | 87 info->id = ime.id(); |
88 info->name = UTF8ToUTF16(util.GetInputMethodDisplayNameFromId(info->id)); | 88 std::string name = util.GetInputMethodDisplayNameFromId(info->id); |
| 89 if (name.empty()) { |
| 90 name = ime.name(); |
| 91 } |
| 92 info->name = UTF8ToUTF16(name); |
| 93 |
89 info->short_name = util.GetInputMethodShortName(ime); | 94 info->short_name = util.GetInputMethodShortName(ime); |
90 } | 95 } |
91 | 96 |
92 | 97 |
93 void BluetoothPowerFailure() { | 98 void BluetoothPowerFailure() { |
94 // TODO(sad): Show an error bubble? | 99 // TODO(sad): Show an error bubble? |
95 } | 100 } |
96 | 101 |
97 void BluetoothDiscoveryFailure() { | 102 void BluetoothDiscoveryFailure() { |
98 // TODO(sad): Show an error bubble? | 103 // TODO(sad): Show an error bubble? |
(...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
926 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); | 931 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); |
927 }; | 932 }; |
928 | 933 |
929 } // namespace | 934 } // namespace |
930 | 935 |
931 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) { | 936 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) { |
932 return new chromeos::SystemTrayDelegate(tray); | 937 return new chromeos::SystemTrayDelegate(tray); |
933 } | 938 } |
934 | 939 |
935 } // namespace chromeos | 940 } // namespace chromeos |
OLD | NEW |