| 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 registrar_.Add(this, | 212 registrar_.Add(this, |
| 212 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, | 213 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, |
| 213 content::NotificationService::AllSources()); | 214 content::NotificationService::AllSources()); |
| 214 | 215 |
| 215 accessibility_enabled_.Init(prefs::kSpokenFeedbackEnabled, | 216 accessibility_enabled_.Init(prefs::kSpokenFeedbackEnabled, |
| 216 g_browser_process->local_state(), this); | 217 g_browser_process->local_state(), this); |
| 217 | 218 |
| 218 network_icon_->SetResourceColorTheme(NetworkMenuIcon::COLOR_LIGHT); | 219 network_icon_->SetResourceColorTheme(NetworkMenuIcon::COLOR_LIGHT); |
| 219 network_icon_dark_->SetResourceColorTheme(NetworkMenuIcon::COLOR_DARK); | 220 network_icon_dark_->SetResourceColorTheme(NetworkMenuIcon::COLOR_DARK); |
| 220 | 221 |
| 221 bluetooth_adapter_ = BluetoothAdapter::DefaultAdapter(); | 222 bluetooth_adapter_ = BluetoothAdapterFactory::DefaultAdapter(); |
| 222 bluetooth_adapter_->AddObserver(this); | 223 bluetooth_adapter_->AddObserver(this); |
| 223 } | 224 } |
| 224 | 225 |
| 225 virtual ~SystemTrayDelegate() { | 226 virtual ~SystemTrayDelegate() { |
| 226 AudioHandler* audiohandler = AudioHandler::GetInstance(); | 227 AudioHandler* audiohandler = AudioHandler::GetInstance(); |
| 227 if (audiohandler) | 228 if (audiohandler) |
| 228 audiohandler->RemoveVolumeObserver(this); | 229 audiohandler->RemoveVolumeObserver(this); |
| 229 DBusThreadManager::Get()->GetSessionManagerClient()->RemoveObserver(this); | 230 DBusThreadManager::Get()->GetSessionManagerClient()->RemoveObserver(this); |
| 230 DBusThreadManager::Get()->GetPowerManagerClient()->RemoveObserver(this); | 231 DBusThreadManager::Get()->GetPowerManagerClient()->RemoveObserver(this); |
| 231 NetworkLibrary* crosnet = CrosLibrary::Get()->GetNetworkLibrary(); | 232 NetworkLibrary* crosnet = CrosLibrary::Get()->GetNetworkLibrary(); |
| (...skipping 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1264 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); | 1265 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); |
| 1265 }; | 1266 }; |
| 1266 | 1267 |
| 1267 } // namespace | 1268 } // namespace |
| 1268 | 1269 |
| 1269 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) { | 1270 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) { |
| 1270 return new chromeos::SystemTrayDelegate(tray); | 1271 return new chromeos::SystemTrayDelegate(tray); |
| 1271 } | 1272 } |
| 1272 | 1273 |
| 1273 } // namespace chromeos | 1274 } // namespace chromeos |
| OLD | NEW |