Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(403)

Side by Side Diff: device/bluetooth/device.h

Issue 2401193002: bluetooth: Add Device service for chrome://bluetooth-internals. (Closed)
Patch Set: Fully qualify mojom import Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « device/bluetooth/adapter.cc ('k') | device/bluetooth/device.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 DEVICE_BLUETOOTH_DEVICE_H_
6 #define DEVICE_BLUETOOTH_DEVICE_H_
7
8 #include <string>
9
10 #include "base/macros.h"
11 #include "base/memory/ref_counted.h"
12 #include "device/bluetooth/bluetooth_adapter.h"
13 #include "device/bluetooth/bluetooth_device.h"
14 #include "device/bluetooth/public/interfaces/device.mojom.h"
15
16 namespace bluetooth {
17
18 // Implementation of Mojo Device located in
19 // device/bluetooth/public/interfaces/device.mojom.
20 // It handles requests to interact with Bluetooth Device.
21 // Uses the platform abstraction of device/bluetooth.
22 class Device : public mojom::Device {
23 public:
24 Device(const std::string& address,
25 scoped_refptr<device::BluetoothAdapter> adapter);
26 ~Device() override;
27
28 // Creates a mojom::DeviceInfo using info from the given |device|.
29 static mojom::DeviceInfoPtr ConstructDeviceInfoStruct(
30 const device::BluetoothDevice* device);
31
32 // mojom::Device overrides:
33 void GetInfo(const GetInfoCallback& callback) override;
34
35 private:
36 // The address of the Bluetooth device.
37 std::string address_;
38
39 // The current BluetoothAdapter.
40 scoped_refptr<device::BluetoothAdapter> adapter_;
41
42 DISALLOW_COPY_AND_ASSIGN(Device);
43 };
44
45 } // namespace bluetooth
46
47 #endif // DEVICE_BLUETOOTH_DEVICE_H_
OLDNEW
« no previous file with comments | « device/bluetooth/adapter.cc ('k') | device/bluetooth/device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698