| Index: ash/common/system/chromeos/bluetooth/tray_bluetooth_helper.cc
|
| diff --git a/chrome/browser/ui/ash/tray_bluetooth_helper.cc b/ash/common/system/chromeos/bluetooth/tray_bluetooth_helper.cc
|
| similarity index 92%
|
| rename from chrome/browser/ui/ash/tray_bluetooth_helper.cc
|
| rename to ash/common/system/chromeos/bluetooth/tray_bluetooth_helper.cc
|
| index 0bd3cda44d465da2e8183090e07f06c9e5945edd..651ae6e1eda01fb3fa520377539de64506a0acbb 100644
|
| --- a/chrome/browser/ui/ash/tray_bluetooth_helper.cc
|
| +++ b/ash/common/system/chromeos/bluetooth/tray_bluetooth_helper.cc
|
| @@ -2,20 +2,21 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "chrome/browser/ui/ash/tray_bluetooth_helper.h"
|
| +#include "ash/common/system/chromeos/bluetooth/tray_bluetooth_helper.h"
|
|
|
| -#include "ash/common/system/tray/system_tray_delegate.h"
|
| +#include "ash/common/system/tray/system_tray_controller.h"
|
| +#include "ash/common/system/tray/system_tray_delegate.h" // BluetoothDeviceInfo
|
| #include "ash/common/system/tray/system_tray_notifier.h"
|
| #include "ash/common/wm_shell.h"
|
| #include "base/bind.h"
|
| #include "base/bind_helpers.h"
|
| #include "base/metrics/user_metrics.h"
|
| -#include "chrome/browser/ui/ash/system_tray_client.h"
|
| #include "device/bluetooth/bluetooth_adapter.h"
|
| #include "device/bluetooth/bluetooth_adapter_factory.h"
|
| #include "device/bluetooth/bluetooth_device.h"
|
| #include "device/bluetooth/bluetooth_discovery_session.h"
|
|
|
| +namespace ash {
|
| namespace {
|
|
|
| void BluetoothSetDiscoveringError() {
|
| @@ -26,7 +27,7 @@ void BluetoothDeviceConnectError(
|
| device::BluetoothDevice::ConnectErrorCode error_code) {}
|
|
|
| ash::SystemTrayNotifier* GetSystemTrayNotifier() {
|
| - return ash::WmShell::Get()->system_tray_notifier();
|
| + return WmShell::Get()->system_tray_notifier();
|
| }
|
|
|
| } // namespace
|
| @@ -52,10 +53,10 @@ void TrayBluetoothHelper::InitializeOnAdapterReady(
|
| }
|
|
|
| void TrayBluetoothHelper::GetAvailableDevices(
|
| - std::vector<ash::BluetoothDeviceInfo>* list) {
|
| + std::vector<BluetoothDeviceInfo>* list) {
|
| device::BluetoothAdapter::DeviceList devices = adapter_->GetDevices();
|
| for (device::BluetoothDevice* device : devices) {
|
| - ash::BluetoothDeviceInfo info;
|
| + BluetoothDeviceInfo info;
|
| info.address = device->GetAddress();
|
| info.display_name = device->GetNameForDisplay();
|
| info.connected = device->IsConnected();
|
| @@ -106,7 +107,7 @@ void TrayBluetoothHelper::ConnectToDevice(const std::string& address) {
|
| return;
|
| }
|
| // Show pairing dialog for the unpaired device.
|
| - SystemTrayClient::Get()->ShowBluetoothPairingDialog(
|
| + WmShell::Get()->system_tray_controller()->ShowBluetoothPairingDialog(
|
| device->GetAddress(), device->GetNameForDisplay(), device->IsPaired(),
|
| device->IsConnected());
|
| }
|
| @@ -179,3 +180,5 @@ void TrayBluetoothHelper::OnStartDiscoverySession(
|
| discovery_session_ = std::move(discovery_session);
|
| GetSystemTrayNotifier()->NotifyBluetoothDiscoveringChanged();
|
| }
|
| +
|
| +} // namespace ash
|
|
|