| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 #endif | 79 #endif |
| 80 | 80 |
| 81 protected: | 81 protected: |
| 82 virtual ~BluetoothGetDevicesFunction() {} | 82 virtual ~BluetoothGetDevicesFunction() {} |
| 83 | 83 |
| 84 // ExtensionFunction: | 84 // ExtensionFunction: |
| 85 virtual bool RunImpl() OVERRIDE; | 85 virtual bool RunImpl() OVERRIDE; |
| 86 | 86 |
| 87 private: | 87 private: |
| 88 #if defined(OS_CHROMEOS) | 88 #if defined(OS_CHROMEOS) |
| 89 void AddDeviceIfTrueCallback(ListValue* list, | 89 void DispatchDeviceSearchResult(const chromeos::BluetoothDevice& device); |
| 90 const chromeos::BluetoothDevice* device, | 90 void ProvidesServiceCallback(const chromeos::BluetoothDevice* device, |
| 91 bool shouldAdd); | 91 bool providesService); |
| 92 | 92 |
| 93 int callbacks_pending_; | 93 int callbacks_pending_; |
| 94 #endif | 94 #endif |
| 95 }; | 95 }; |
| 96 | 96 |
| 97 class BluetoothGetServicesFunction : public AsyncExtensionFunction { | 97 class BluetoothGetServicesFunction : public AsyncExtensionFunction { |
| 98 public: | 98 public: |
| 99 DECLARE_EXTENSION_FUNCTION_NAME("experimental.bluetooth.getServices") | 99 DECLARE_EXTENSION_FUNCTION_NAME("experimental.bluetooth.getServices") |
| 100 | 100 |
| 101 protected: | 101 protected: |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 private: | 250 private: |
| 251 void OnSuccessCallback(); | 251 void OnSuccessCallback(); |
| 252 void OnErrorCallback(); | 252 void OnErrorCallback(); |
| 253 #endif | 253 #endif |
| 254 }; | 254 }; |
| 255 | 255 |
| 256 } // namespace api | 256 } // namespace api |
| 257 } // namespace extensions | 257 } // namespace extensions |
| 258 | 258 |
| 259 #endif // CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_API_H_ | 259 #endif // CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_API_H_ |
| OLD | NEW |