Chromium Code Reviews| Index: chrome/browser/chromeos/system/ash_system_tray_delegate.cc |
| diff --git a/chrome/browser/chromeos/system/ash_system_tray_delegate.cc b/chrome/browser/chromeos/system/ash_system_tray_delegate.cc |
| index 8bf40b36fd1cbbd8344a84d4655fbfcf07015aed..93bc20156d4f8b573e33a37b54bd1c418d83ba94 100644 |
| --- a/chrome/browser/chromeos/system/ash_system_tray_delegate.cc |
| +++ b/chrome/browser/chromeos/system/ash_system_tray_delegate.cc |
| @@ -31,9 +31,6 @@ |
| #include "chrome/browser/browser_process.h" |
| #include "chrome/browser/chromeos/accessibility/accessibility_util.h" |
| #include "chrome/browser/chromeos/audio/audio_handler.h" |
| -#include "chrome/browser/chromeos/bluetooth/bluetooth_adapter.h" |
| -#include "chrome/browser/chromeos/bluetooth/bluetooth_adapter_factory.h" |
| -#include "chrome/browser/chromeos/bluetooth/bluetooth_device.h" |
| #include "chrome/browser/chromeos/cros/cros_library.h" |
| #include "chrome/browser/chromeos/cros/network_library.h" |
| #include "chrome/browser/chromeos/gdata/drive_service_interface.h" |
| @@ -74,6 +71,9 @@ |
| #include "content/public/browser/notification_observer.h" |
| #include "content/public/browser/notification_service.h" |
| #include "content/public/browser/user_metrics.h" |
| +#include "device/bluetooth/bluetooth_adapter.h" |
| +#include "device/bluetooth/bluetooth_adapter_factory.h" |
| +#include "device/bluetooth/bluetooth_device.h" |
| #include "grit/generated_resources.h" |
| #include "ui/base/l10n/l10n_util.h" |
| @@ -156,7 +156,7 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate, |
| public content::NotificationObserver, |
| public input_method::InputMethodManager::Observer, |
| public system::TimezoneSettings::Observer, |
| - public BluetoothAdapter::Observer, |
| + public bluetooth::BluetoothAdapter::Observer, |
| public SystemKeyEventListener::CapsLockObserver, |
| public ash::NetworkTrayDelegate { |
| public: |
| @@ -218,7 +218,8 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate, |
| network_icon_->SetResourceColorTheme(NetworkMenuIcon::COLOR_LIGHT); |
| network_icon_dark_->SetResourceColorTheme(NetworkMenuIcon::COLOR_DARK); |
| - bluetooth_adapter_ = BluetoothAdapterFactory::DefaultAdapter(); |
| + bluetooth_adapter_ = bluetooth::BluetoothAdapterFactory::DefaultAdapter(); |
| + DCHECK(bluetooth_adapter_.get()); |
|
bryeung
2012/10/10 15:03:53
can we leave this CL as purely a refactoring for n
youngki
2012/10/10 18:34:56
Done.
|
| bluetooth_adapter_->AddObserver(this); |
| } |
| @@ -364,9 +365,10 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate, |
| virtual void GetAvailableBluetoothDevices( |
| ash::BluetoothDeviceList* list) OVERRIDE { |
| - BluetoothAdapter::DeviceList devices = bluetooth_adapter_->GetDevices(); |
| + bluetooth::BluetoothAdapter::DeviceList devices = |
| + bluetooth_adapter_->GetDevices(); |
| for (size_t i = 0; i < devices.size(); ++i) { |
| - BluetoothDevice* device = devices[i]; |
| + bluetooth::BluetoothDevice* device = devices[i]; |
| if (!device->IsPaired()) |
| continue; |
| ash::BluetoothDeviceInfo info; |
| @@ -378,7 +380,7 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate, |
| } |
| virtual void ToggleBluetoothConnection(const std::string& address) OVERRIDE { |
| - BluetoothDevice* device = bluetooth_adapter_->GetDevice(address); |
| + bluetooth::BluetoothDevice* device = bluetooth_adapter_->GetDevice(address); |
| if (!device) |
| return; |
| if (device->IsConnected()) { |
| @@ -1155,34 +1157,34 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate, |
| } |
| // Overridden from BluetoothAdapter::Observer. |
| - virtual void AdapterPresentChanged(BluetoothAdapter* adapter, |
| + virtual void AdapterPresentChanged(bluetooth::BluetoothAdapter* adapter, |
| bool present) OVERRIDE { |
| NotifyRefreshBluetooth(); |
| } |
| - virtual void AdapterPoweredChanged(BluetoothAdapter* adapter, |
| + virtual void AdapterPoweredChanged(bluetooth::BluetoothAdapter* adapter, |
| bool powered) OVERRIDE { |
| NotifyRefreshBluetooth(); |
| } |
| - virtual void AdapterDiscoveringChanged(BluetoothAdapter* adapter, |
| + virtual void AdapterDiscoveringChanged(bluetooth::BluetoothAdapter* adapter, |
| bool discovering) OVERRIDE { |
| // TODO: Perhaps start/stop throbbing the icon, or some other visual |
| // effects? |
| } |
| - virtual void DeviceAdded(BluetoothAdapter* adapter, |
| - BluetoothDevice* device) OVERRIDE { |
| + virtual void DeviceAdded(bluetooth::BluetoothAdapter* adapter, |
| + bluetooth::BluetoothDevice* device) OVERRIDE { |
| NotifyRefreshBluetooth(); |
| } |
| - virtual void DeviceChanged(BluetoothAdapter* adapter, |
| - BluetoothDevice* device) OVERRIDE { |
| + virtual void DeviceChanged(bluetooth::BluetoothAdapter* adapter, |
| + bluetooth::BluetoothDevice* device) OVERRIDE { |
| NotifyRefreshBluetooth(); |
| } |
| - virtual void DeviceRemoved(BluetoothAdapter* adapter, |
| - BluetoothDevice* device) OVERRIDE { |
| + virtual void DeviceRemoved(bluetooth::BluetoothAdapter* adapter, |
| + bluetooth::BluetoothDevice* device) OVERRIDE { |
| NotifyRefreshBluetooth(); |
| } |
| @@ -1251,7 +1253,7 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate, |
| std::string last_connection_string_; |
| - scoped_refptr<BluetoothAdapter> bluetooth_adapter_; |
| + scoped_refptr<bluetooth::BluetoothAdapter> bluetooth_adapter_; |
| BooleanPrefMember accessibility_enabled_; |