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