| 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 "chrome/browser/extensions/api/api_function.h" | 10 #include "chrome/browser/extensions/api/api_function.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 public: | 52 public: |
| 53 DECLARE_EXTENSION_FUNCTION_NAME("experimental.bluetooth.getAddress") | 53 DECLARE_EXTENSION_FUNCTION_NAME("experimental.bluetooth.getAddress") |
| 54 | 54 |
| 55 protected: | 55 protected: |
| 56 virtual ~BluetoothGetAddressFunction() {} | 56 virtual ~BluetoothGetAddressFunction() {} |
| 57 | 57 |
| 58 // ExtensionFunction: | 58 // ExtensionFunction: |
| 59 virtual bool RunImpl() OVERRIDE; | 59 virtual bool RunImpl() OVERRIDE; |
| 60 }; | 60 }; |
| 61 | 61 |
| 62 class BluetoothGetNameFunction : public SyncExtensionFunction { |
| 63 public: |
| 64 DECLARE_EXTENSION_FUNCTION_NAME("experimental.bluetooth.getName") |
| 65 |
| 66 protected: |
| 67 virtual ~BluetoothGetNameFunction() {} |
| 68 |
| 69 // ExtensionFunction: |
| 70 virtual bool RunImpl() OVERRIDE; |
| 71 }; |
| 72 |
| 62 class BluetoothGetDevicesFunction : public AsyncExtensionFunction { | 73 class BluetoothGetDevicesFunction : public AsyncExtensionFunction { |
| 63 public: | 74 public: |
| 64 DECLARE_EXTENSION_FUNCTION_NAME("experimental.bluetooth.getDevices") | 75 DECLARE_EXTENSION_FUNCTION_NAME("experimental.bluetooth.getDevices") |
| 65 | 76 |
| 66 #if defined(OS_CHROMEOS) | 77 #if defined(OS_CHROMEOS) |
| 67 BluetoothGetDevicesFunction(); | 78 BluetoothGetDevicesFunction(); |
| 68 #endif | 79 #endif |
| 69 | 80 |
| 70 protected: | 81 protected: |
| 71 virtual ~BluetoothGetDevicesFunction() {} | 82 virtual ~BluetoothGetDevicesFunction() {} |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 private: | 250 private: |
| 240 void OnSuccessCallback(); | 251 void OnSuccessCallback(); |
| 241 void OnErrorCallback(); | 252 void OnErrorCallback(); |
| 242 #endif | 253 #endif |
| 243 }; | 254 }; |
| 244 | 255 |
| 245 } // namespace api | 256 } // namespace api |
| 246 } // namespace extensions | 257 } // namespace extensions |
| 247 | 258 |
| 248 #endif // CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_API_H_ | 259 #endif // CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_API_H_ |
| OLD | NEW |