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); | 19 bluetooth_chooser_controller_->OnAdapterPresenceChanged(presence); |
20 } | 20 } |
21 | 21 |
22 void BluetoothChooserDesktop::ShowDiscoveryState(DiscoveryState state) { | 22 void BluetoothChooserDesktop::ShowDiscoveryState(DiscoveryState state) { |
23 bluetooth_chooser_controller_->OnDiscoveryStateChanged(state); | 23 bluetooth_chooser_controller_->OnDiscoveryStateChanged(state); |
24 } | 24 } |
25 | 25 |
26 void BluetoothChooserDesktop::AddDevice(const std::string& device_id, | 26 void BluetoothChooserDesktop::AddOrUpdateDevice( |
27 const base::string16& device_name) { | 27 const std::string& device_id, |
28 bluetooth_chooser_controller_->AddDevice(device_id, device_name); | 28 const base::string16& device_name) { |
| 29 bluetooth_chooser_controller_->AddOrUpdateDevice(device_id, device_name); |
29 } | 30 } |
30 | 31 |
31 void BluetoothChooserDesktop::RemoveDevice(const std::string& device_id) { | 32 void BluetoothChooserDesktop::RemoveDevice(const std::string& device_id) { |
32 bluetooth_chooser_controller_->RemoveDevice(device_id); | 33 bluetooth_chooser_controller_->RemoveDevice(device_id); |
33 } | 34 } |
OLD | NEW |