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 14 matching lines...) Expand all Loading... |
25 #include "base/bind_helpers.h" | 25 #include "base/bind_helpers.h" |
26 #include "base/callback.h" | 26 #include "base/callback.h" |
27 #include "base/chromeos/chromeos_version.h" | 27 #include "base/chromeos/chromeos_version.h" |
28 #include "base/logging.h" | 28 #include "base/logging.h" |
29 #include "base/memory/weak_ptr.h" | 29 #include "base/memory/weak_ptr.h" |
30 #include "base/utf_string_conversions.h" | 30 #include "base/utf_string_conversions.h" |
31 #include "chrome/browser/browser_process.h" | 31 #include "chrome/browser/browser_process.h" |
32 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" | 32 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" |
33 #include "chrome/browser/chromeos/audio/audio_handler.h" | 33 #include "chrome/browser/chromeos/audio/audio_handler.h" |
34 #include "chrome/browser/chromeos/bluetooth/bluetooth_adapter.h" | 34 #include "chrome/browser/chromeos/bluetooth/bluetooth_adapter.h" |
| 35 #include "chrome/browser/chromeos/bluetooth/bluetooth_adapter_factory.h" |
35 #include "chrome/browser/chromeos/bluetooth/bluetooth_device.h" | 36 #include "chrome/browser/chromeos/bluetooth/bluetooth_device.h" |
36 #include "chrome/browser/chromeos/cros/cros_library.h" | 37 #include "chrome/browser/chromeos/cros/cros_library.h" |
37 #include "chrome/browser/chromeos/cros/network_library.h" | 38 #include "chrome/browser/chromeos/cros/network_library.h" |
38 #include "chrome/browser/chromeos/gdata/drive_service_interface.h" | 39 #include "chrome/browser/chromeos/gdata/drive_service_interface.h" |
39 #include "chrome/browser/chromeos/gdata/drive_system_service.h" | 40 #include "chrome/browser/chromeos/gdata/drive_system_service.h" |
40 #include "chrome/browser/chromeos/input_method/input_method_manager.h" | 41 #include "chrome/browser/chromeos/input_method/input_method_manager.h" |
41 #include "chrome/browser/chromeos/input_method/input_method_util.h" | 42 #include "chrome/browser/chromeos/input_method/input_method_util.h" |
42 #include "chrome/browser/chromeos/input_method/xkeyboard.h" | 43 #include "chrome/browser/chromeos/input_method/xkeyboard.h" |
43 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" | 44 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" |
44 #include "chrome/browser/chromeos/login/base_login_display_host.h" | 45 #include "chrome/browser/chromeos/login/base_login_display_host.h" |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 registrar_.Add(this, | 209 registrar_.Add(this, |
209 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, | 210 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, |
210 content::NotificationService::AllSources()); | 211 content::NotificationService::AllSources()); |
211 | 212 |
212 accessibility_enabled_.Init(prefs::kSpokenFeedbackEnabled, | 213 accessibility_enabled_.Init(prefs::kSpokenFeedbackEnabled, |
213 g_browser_process->local_state(), this); | 214 g_browser_process->local_state(), this); |
214 | 215 |
215 network_icon_->SetResourceColorTheme(NetworkMenuIcon::COLOR_LIGHT); | 216 network_icon_->SetResourceColorTheme(NetworkMenuIcon::COLOR_LIGHT); |
216 network_icon_dark_->SetResourceColorTheme(NetworkMenuIcon::COLOR_DARK); | 217 network_icon_dark_->SetResourceColorTheme(NetworkMenuIcon::COLOR_DARK); |
217 | 218 |
218 bluetooth_adapter_ = BluetoothAdapter::DefaultAdapter(); | 219 bluetooth_adapter_ = BluetoothAdapterFactory::DefaultAdapter(); |
219 bluetooth_adapter_->AddObserver(this); | 220 bluetooth_adapter_->AddObserver(this); |
220 } | 221 } |
221 | 222 |
222 virtual ~SystemTrayDelegate() { | 223 virtual ~SystemTrayDelegate() { |
223 AudioHandler* audiohandler = AudioHandler::GetInstance(); | 224 AudioHandler* audiohandler = AudioHandler::GetInstance(); |
224 if (audiohandler) | 225 if (audiohandler) |
225 audiohandler->RemoveVolumeObserver(this); | 226 audiohandler->RemoveVolumeObserver(this); |
226 DBusThreadManager::Get()->GetSessionManagerClient()->RemoveObserver(this); | 227 DBusThreadManager::Get()->GetSessionManagerClient()->RemoveObserver(this); |
227 DBusThreadManager::Get()->GetPowerManagerClient()->RemoveObserver(this); | 228 DBusThreadManager::Get()->GetPowerManagerClient()->RemoveObserver(this); |
228 NetworkLibrary* crosnet = CrosLibrary::Get()->GetNetworkLibrary(); | 229 NetworkLibrary* crosnet = CrosLibrary::Get()->GetNetworkLibrary(); |
(...skipping 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1253 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); | 1254 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); |
1254 }; | 1255 }; |
1255 | 1256 |
1256 } // namespace | 1257 } // namespace |
1257 | 1258 |
1258 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) { | 1259 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) { |
1259 return new chromeos::SystemTrayDelegate(tray); | 1260 return new chromeos::SystemTrayDelegate(tray); |
1260 } | 1261 } |
1261 | 1262 |
1262 } // namespace chromeos | 1263 } // namespace chromeos |
OLD | NEW |