OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_UI_WEBUI_BLUETOOTH_INTERNALS_SERVICES_BLUETOOTH_ADAPTER_S ERVICE_H_ | |
6 #define CHROME_BROWSER_UI_WEBUI_BLUETOOTH_INTERNALS_SERVICES_BLUETOOTH_ADAPTER_S ERVICE_H_ | |
7 | |
8 #include <set> | |
9 #include <string> | |
10 | |
11 #include "base/macros.h" | |
12 #include "base/strings/utf_string_conversions.h" | |
13 #include "chrome/browser/ui/webui/bluetooth_internals/bluetooth_internals.mojom. h" | |
14 #include "chrome/browser/ui/webui/mojo_web_ui_handler.h" | |
15 #include "device/bluetooth/bluetooth_adapter.h" | |
16 #include "device/bluetooth/bluetooth_adapter_factory_wrapper.h" | |
17 #include "mojo/public/cpp/bindings/binding.h" | |
18 | |
19 class BluetoothAdapterService : public bluetooth::Adapter, | |
ortuno
2016/09/22 08:32:54
Is BluetoothAdapter the right name here? I thought
mbrunson
2016/09/24 01:05:47
Since everything is a WIP, this file will change m
ortuno
2016/09/26 01:57:55
This is not really a big issue but I was just wond
| |
20 public device::BluetoothAdapter::Observer { | |
21 public: | |
22 explicit BluetoothAdapterService(bluetooth::AdapterClientPtr client); | |
23 ~BluetoothAdapterService() override; | |
24 | |
25 // bluetooth::AdapterService overrides: | |
26 void GetDevices(int8_t index, | |
27 int8_t count, | |
28 const GetDevicesCallback& callback) override; | |
29 | |
30 // device::BluetoothAdapter::Observer overrides: | |
31 void DeviceAdded(device::BluetoothAdapter* adapter, | |
32 device::BluetoothDevice* device) override; | |
33 | |
34 void DeviceRemoved(device::BluetoothAdapter* adapter, | |
35 device::BluetoothDevice* device) override; | |
36 | |
37 private: | |
38 device::BluetoothAdapter* GetAdapter(); | |
39 bluetooth::DeviceInfoPtr GetDeviceInfo(device::BluetoothDevice* device); | |
40 void OnAdapterAcquired(device::BluetoothAdapter* adapter); | |
41 | |
42 std::set<std::string> addresses_; | |
43 bluetooth::AdapterClientPtr client_; | |
44 base::WeakPtrFactory<BluetoothAdapterService> weak_ptr_factory_; | |
45 | |
46 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterService); | |
47 }; | |
48 | |
49 #endif // CHROME_BROWSER_UI_WEBUI_BLUETOOTH_INTERNALS_SERVICES_BLUETOOTH_ADAPTE R_SERVICE_H_ | |
OLD | NEW |