| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_EASY_UNLOCK_PRIVATE_EASY_UNLOCK_PRIVATE_AP
I_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_EASY_UNLOCK_PRIVATE_EASY_UNLOCK_PRIVATE_AP
I_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_EASY_UNLOCK_PRIVATE_EASY_UNLOCK_PRIVATE_AP
I_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_EASY_UNLOCK_PRIVATE_EASY_UNLOCK_PRIVATE_AP
I_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "chrome/browser/extensions/api/bluetooth_socket/bluetooth_socket_api.h" |
| 12 #include "extensions/browser/browser_context_keyed_api_factory.h" | 13 #include "extensions/browser/browser_context_keyed_api_factory.h" |
| 13 #include "extensions/browser/extension_function.h" | 14 #include "extensions/browser/extension_function.h" |
| 14 | 15 |
| 15 // Implementations for chrome.easyUnlockPrivate API functions. | 16 // Implementations for chrome.easyUnlockPrivate API functions. |
| 16 | 17 |
| 17 namespace content { | 18 namespace content { |
| 18 class BrowserContext; | 19 class BrowserContext; |
| 19 } | 20 } |
| 20 | 21 |
| 21 namespace extensions { | 22 namespace extensions { |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 // AsyncExtensionFunction: | 158 // AsyncExtensionFunction: |
| 158 virtual bool RunAsync() OVERRIDE; | 159 virtual bool RunAsync() OVERRIDE; |
| 159 | 160 |
| 160 // Callback that is called when the seek operation succeeds. | 161 // Callback that is called when the seek operation succeeds. |
| 161 void OnSeekCompleted(const easy_unlock::SeekDeviceResult& seek_result); | 162 void OnSeekCompleted(const easy_unlock::SeekDeviceResult& seek_result); |
| 162 | 163 |
| 163 DISALLOW_COPY_AND_ASSIGN( | 164 DISALLOW_COPY_AND_ASSIGN( |
| 164 EasyUnlockPrivateSeekBluetoothDeviceByAddressFunction); | 165 EasyUnlockPrivateSeekBluetoothDeviceByAddressFunction); |
| 165 }; | 166 }; |
| 166 | 167 |
| 168 class EasyUnlockPrivateConnectToBluetoothServiceInsecurelyFunction |
| 169 : public BluetoothSocketAbstractConnectFunction { |
| 170 public: |
| 171 DECLARE_EXTENSION_FUNCTION( |
| 172 "easyUnlockPrivate.connectToBluetoothServiceInsecurely", |
| 173 EASYUNLOCKPRIVATE_CONNECTTOBLUETOOTHSERVICEINSECURELY) |
| 174 EasyUnlockPrivateConnectToBluetoothServiceInsecurelyFunction(); |
| 175 |
| 176 private: |
| 177 virtual ~EasyUnlockPrivateConnectToBluetoothServiceInsecurelyFunction(); |
| 178 |
| 179 // BluetoothSocketAbstractConnectFunction: |
| 180 virtual void ConnectToService(device::BluetoothDevice* device, |
| 181 const device::BluetoothUUID& uuid) OVERRIDE; |
| 182 |
| 183 DISALLOW_COPY_AND_ASSIGN( |
| 184 EasyUnlockPrivateConnectToBluetoothServiceInsecurelyFunction); |
| 185 }; |
| 186 |
| 167 class EasyUnlockPrivateUpdateScreenlockStateFunction | 187 class EasyUnlockPrivateUpdateScreenlockStateFunction |
| 168 : public SyncExtensionFunction { | 188 : public SyncExtensionFunction { |
| 169 public: | 189 public: |
| 170 EasyUnlockPrivateUpdateScreenlockStateFunction(); | 190 EasyUnlockPrivateUpdateScreenlockStateFunction(); |
| 171 | 191 |
| 172 protected: | 192 protected: |
| 173 virtual ~EasyUnlockPrivateUpdateScreenlockStateFunction(); | 193 virtual ~EasyUnlockPrivateUpdateScreenlockStateFunction(); |
| 174 | 194 |
| 175 virtual bool RunSync() OVERRIDE; | 195 virtual bool RunSync() OVERRIDE; |
| 176 | 196 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 // SyncExtensionFunction: | 274 // SyncExtensionFunction: |
| 255 virtual bool RunSync() OVERRIDE; | 275 virtual bool RunSync() OVERRIDE; |
| 256 | 276 |
| 257 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateGetRemoteDevicesFunction); | 277 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateGetRemoteDevicesFunction); |
| 258 }; | 278 }; |
| 259 | 279 |
| 260 } // namespace api | 280 } // namespace api |
| 261 } // namespace extensions | 281 } // namespace extensions |
| 262 | 282 |
| 263 #endif // CHROME_BROWSER_EXTENSIONS_API_EASY_UNLOCK_PRIVATE_EASY_UNLOCK_PRIVATE
_API_H_ | 283 #endif // CHROME_BROWSER_EXTENSIONS_API_EASY_UNLOCK_PRIVATE_EASY_UNLOCK_PRIVATE
_API_H_ |
| OLD | NEW |