OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/ui/bluetooth/bluetooth_chooser_desktop.h" | 5 #include "chrome/browser/ui/bluetooth/bluetooth_chooser_desktop.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "chrome/browser/ui/bluetooth/bluetooth_chooser_controller.h" | 8 #include "chrome/browser/ui/bluetooth/bluetooth_chooser_controller.h" |
9 | 9 |
10 BluetoothChooserDesktop::BluetoothChooserDesktop( | 10 BluetoothChooserDesktop::BluetoothChooserDesktop( |
11 BluetoothChooserController* bluetooth_chooser_controller) | 11 BluetoothChooserController* bluetooth_chooser_controller) |
12 : bluetooth_chooser_controller_(bluetooth_chooser_controller) { | 12 : bluetooth_chooser_controller_(bluetooth_chooser_controller) { |
13 DCHECK(bluetooth_chooser_controller_); | 13 DCHECK(bluetooth_chooser_controller_); |
14 } | 14 } |
15 | 15 |
16 BluetoothChooserDesktop::~BluetoothChooserDesktop() {} | 16 BluetoothChooserDesktop::~BluetoothChooserDesktop() {} |
17 | 17 |
18 void BluetoothChooserDesktop::SetAdapterPresence(AdapterPresence presence) {} | 18 void BluetoothChooserDesktop::SetAdapterPresence(AdapterPresence presence) { |
| 19 bluetooth_chooser_controller_->OnAdapterPresenceChanged(presence); |
| 20 } |
19 | 21 |
20 void BluetoothChooserDesktop::ShowDiscoveryState(DiscoveryState state) {} | 22 void BluetoothChooserDesktop::ShowDiscoveryState(DiscoveryState state) { |
| 23 bluetooth_chooser_controller_->OnDiscoveryStateChanged(state); |
| 24 } |
21 | 25 |
22 void BluetoothChooserDesktop::AddDevice(const std::string& device_id, | 26 void BluetoothChooserDesktop::AddDevice(const std::string& device_id, |
23 const base::string16& device_name) { | 27 const base::string16& device_name) { |
24 bluetooth_chooser_controller_->AddDevice(device_id, device_name); | 28 bluetooth_chooser_controller_->AddDevice(device_id, device_name); |
25 } | 29 } |
26 | 30 |
27 void BluetoothChooserDesktop::RemoveDevice(const std::string& device_id) { | 31 void BluetoothChooserDesktop::RemoveDevice(const std::string& device_id) { |
28 bluetooth_chooser_controller_->RemoveDevice(device_id); | 32 bluetooth_chooser_controller_->RemoveDevice(device_id); |
29 } | 33 } |
OLD | NEW |