OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_API_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_API_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "chrome/browser/extensions/api/bluetooth/bluetooth_extension_function.h
" | 12 #include "chrome/browser/extensions/api/bluetooth/bluetooth_extension_function.h
" |
13 #include "device/bluetooth/bluetooth_device.h" | 13 #include "device/bluetooth/bluetooth_device.h" |
14 #include "device/bluetooth/bluetooth_profile.h" | 14 #include "device/bluetooth/bluetooth_profile.h" |
| 15 #include "device/bluetooth/bluetooth_uuid.h" |
15 #include "extensions/browser/api/async_api_function.h" | 16 #include "extensions/browser/api/async_api_function.h" |
16 #include "extensions/browser/browser_context_keyed_api_factory.h" | 17 #include "extensions/browser/browser_context_keyed_api_factory.h" |
17 #include "extensions/browser/event_router.h" | 18 #include "extensions/browser/event_router.h" |
18 #include "extensions/browser/extension_function.h" | 19 #include "extensions/browser/extension_function.h" |
19 | 20 |
20 namespace content { | 21 namespace content { |
21 class BrowserContext; | 22 class BrowserContext; |
22 } | 23 } |
23 | 24 |
24 namespace device { | 25 namespace device { |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 virtual ~BluetoothAddProfileFunction() {} | 82 virtual ~BluetoothAddProfileFunction() {} |
82 virtual bool RunImpl() OVERRIDE; | 83 virtual bool RunImpl() OVERRIDE; |
83 | 84 |
84 virtual void RegisterProfile( | 85 virtual void RegisterProfile( |
85 const device::BluetoothProfile::Options& options, | 86 const device::BluetoothProfile::Options& options, |
86 const device::BluetoothProfile::ProfileCallback& callback); | 87 const device::BluetoothProfile::ProfileCallback& callback); |
87 | 88 |
88 private: | 89 private: |
89 void OnProfileRegistered(device::BluetoothProfile* bluetooth_profile); | 90 void OnProfileRegistered(device::BluetoothProfile* bluetooth_profile); |
90 | 91 |
91 std::string uuid_; | 92 device::BluetoothUUID uuid_; |
92 }; | 93 }; |
93 | 94 |
94 class BluetoothRemoveProfileFunction : public SyncExtensionFunction { | 95 class BluetoothRemoveProfileFunction : public SyncExtensionFunction { |
95 public: | 96 public: |
96 DECLARE_EXTENSION_FUNCTION("bluetooth.removeProfile", | 97 DECLARE_EXTENSION_FUNCTION("bluetooth.removeProfile", |
97 BLUETOOTH_REMOVEPROFILE) | 98 BLUETOOTH_REMOVEPROFILE) |
98 | 99 |
99 protected: | 100 protected: |
100 virtual ~BluetoothRemoveProfileFunction() {} | 101 virtual ~BluetoothRemoveProfileFunction() {} |
101 virtual bool RunImpl() OVERRIDE; | 102 virtual bool RunImpl() OVERRIDE; |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 | 260 |
260 private: | 261 private: |
261 void OnSuccessCallback(); | 262 void OnSuccessCallback(); |
262 void OnErrorCallback(); | 263 void OnErrorCallback(); |
263 }; | 264 }; |
264 | 265 |
265 } // namespace api | 266 } // namespace api |
266 } // namespace extensions | 267 } // namespace extensions |
267 | 268 |
268 #endif // CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_API_H_ | 269 #endif // CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_API_H_ |
OLD | NEW |