| 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" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 // Created lazily on first access. | 53 // Created lazily on first access. |
| 54 scoped_ptr<ExtensionBluetoothEventRouter> bluetooth_event_router_; | 54 scoped_ptr<ExtensionBluetoothEventRouter> bluetooth_event_router_; |
| 55 }; | 55 }; |
| 56 | 56 |
| 57 namespace api { | 57 namespace api { |
| 58 | 58 |
| 59 class BluetoothAddProfileFunction : public AsyncExtensionFunction { | 59 class BluetoothAddProfileFunction : public AsyncExtensionFunction { |
| 60 public: | 60 public: |
| 61 DECLARE_EXTENSION_FUNCTION("bluetooth.addProfile", BLUETOOTH_ADDPROFILE) | 61 DECLARE_EXTENSION_FUNCTION("bluetooth.addProfile", BLUETOOTH_ADDPROFILE) |
| 62 | 62 |
| 63 virtual bool RunImpl() OVERRIDE; | 63 BluetoothAddProfileFunction(); |
| 64 | 64 |
| 65 protected: | 65 protected: |
| 66 virtual ~BluetoothAddProfileFunction() {} | 66 virtual ~BluetoothAddProfileFunction() {} |
| 67 virtual bool RunImpl() OVERRIDE; |
| 68 |
| 69 private: |
| 70 void OnProfileRegistered(device::BluetoothProfile* bluetooth_profile); |
| 71 |
| 72 std::string uuid_; |
| 67 }; | 73 }; |
| 68 | 74 |
| 69 class BluetoothRemoveProfileFunction : public AsyncExtensionFunction { | 75 class BluetoothRemoveProfileFunction : public SyncExtensionFunction { |
| 70 public: | 76 public: |
| 71 DECLARE_EXTENSION_FUNCTION("bluetooth.removeProfile", | 77 DECLARE_EXTENSION_FUNCTION("bluetooth.removeProfile", |
| 72 BLUETOOTH_REMOVEPROFILE) | 78 BLUETOOTH_REMOVEPROFILE) |
| 73 virtual bool RunImpl() OVERRIDE; | |
| 74 | 79 |
| 75 protected: | 80 protected: |
| 76 virtual ~BluetoothRemoveProfileFunction() {} | 81 virtual ~BluetoothRemoveProfileFunction() {} |
| 82 virtual bool RunImpl() OVERRIDE; |
| 77 }; | 83 }; |
| 78 | 84 |
| 79 class BluetoothGetProfilesFunction : public BluetoothExtensionFunction { | 85 class BluetoothGetProfilesFunction : public BluetoothExtensionFunction { |
| 80 public: | 86 public: |
| 81 DECLARE_EXTENSION_FUNCTION("bluetooth.getProfiles", BLUETOOTH_GETPROFILES) | 87 DECLARE_EXTENSION_FUNCTION("bluetooth.getProfiles", BLUETOOTH_GETPROFILES) |
| 82 | 88 |
| 83 protected: | 89 protected: |
| 84 virtual ~BluetoothGetProfilesFunction() {} | 90 virtual ~BluetoothGetProfilesFunction() {} |
| 85 | 91 |
| 86 // BluetoothExtensionFunction: | 92 // BluetoothExtensionFunction: |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 | 267 |
| 262 private: | 268 private: |
| 263 void OnSuccessCallback(); | 269 void OnSuccessCallback(); |
| 264 void OnErrorCallback(); | 270 void OnErrorCallback(); |
| 265 }; | 271 }; |
| 266 | 272 |
| 267 } // namespace api | 273 } // namespace api |
| 268 } // namespace extensions | 274 } // namespace extensions |
| 269 | 275 |
| 270 #endif // CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_API_H_ | 276 #endif // CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_API_H_ |
| OLD | NEW |