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 bluetooth_chooser_controller_->ResetEventHandler(); | |
Jeffrey Yasskin
2016/08/05 20:37:51
Comment here that this satisfies the WebContentsDe
juncai
2016/08/05 22:51:58
Done.
| |
18 } | |
17 | 19 |
18 void BluetoothChooserDesktop::SetAdapterPresence(AdapterPresence presence) { | 20 void BluetoothChooserDesktop::SetAdapterPresence(AdapterPresence presence) { |
19 bluetooth_chooser_controller_->OnAdapterPresenceChanged(presence); | 21 bluetooth_chooser_controller_->OnAdapterPresenceChanged(presence); |
20 } | 22 } |
21 | 23 |
22 void BluetoothChooserDesktop::ShowDiscoveryState(DiscoveryState state) { | 24 void BluetoothChooserDesktop::ShowDiscoveryState(DiscoveryState state) { |
23 bluetooth_chooser_controller_->OnDiscoveryStateChanged(state); | 25 bluetooth_chooser_controller_->OnDiscoveryStateChanged(state); |
24 } | 26 } |
25 | 27 |
26 void BluetoothChooserDesktop::AddDevice(const std::string& device_id, | 28 void BluetoothChooserDesktop::AddDevice(const std::string& device_id, |
27 const base::string16& device_name) { | 29 const base::string16& device_name) { |
28 bluetooth_chooser_controller_->AddDevice(device_id, device_name); | 30 bluetooth_chooser_controller_->AddDevice(device_id, device_name); |
29 } | 31 } |
30 | 32 |
31 void BluetoothChooserDesktop::RemoveDevice(const std::string& device_id) { | 33 void BluetoothChooserDesktop::RemoveDevice(const std::string& device_id) { |
32 bluetooth_chooser_controller_->RemoveDevice(device_id); | 34 bluetooth_chooser_controller_->RemoveDevice(device_id); |
33 } | 35 } |
OLD | NEW |