Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(331)

Side by Side Diff: chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.h

Issue 813303003: Add easyUnlockPrivate.getConnection API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "device/bluetooth/bluetooth_device.h"
13 #include "extensions/browser/api/bluetooth/bluetooth_extension_function.h"
12 #include "extensions/browser/api/bluetooth_socket/bluetooth_socket_api.h" 14 #include "extensions/browser/api/bluetooth_socket/bluetooth_socket_api.h"
13 #include "extensions/browser/browser_context_keyed_api_factory.h" 15 #include "extensions/browser/browser_context_keyed_api_factory.h"
14 #include "extensions/browser/extension_function.h" 16 #include "extensions/browser/extension_function.h"
15 17
16 // Implementations for chrome.easyUnlockPrivate API functions. 18 // Implementations for chrome.easyUnlockPrivate API functions.
17 19
18 namespace content { 20 namespace content {
19 class BrowserContext; 21 class BrowserContext;
20 } 22 }
21 23
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 342
341 private: 343 private:
342 ~EasyUnlockPrivateGetUserImageFunction() override; 344 ~EasyUnlockPrivateGetUserImageFunction() override;
343 345
344 // SyncExtensionFunction: 346 // SyncExtensionFunction:
345 bool RunSync() override; 347 bool RunSync() override;
346 348
347 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateGetUserImageFunction); 349 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateGetUserImageFunction);
348 }; 350 };
349 351
352 class EasyUnlockPrivateGetConnectionInfoFunction
353 : public core_api::BluetoothExtensionFunction {
354 public:
355 DECLARE_EXTENSION_FUNCTION("easyUnlockPrivate.getConnectionInfo",
356 EASYUNLOCKPRIVATE_GETCONNECTIONINFO)
357 EasyUnlockPrivateGetConnectionInfoFunction();
358
359 private:
360 ~EasyUnlockPrivateGetConnectionInfoFunction() override;
361
362 // BluetoothExtensionFunction:
363 bool DoWork(scoped_refptr<device::BluetoothAdapter> adapter) override;
364
365 void OnConnectionInfo(
366 const device::BluetoothDevice::ConnectionInfo& connection_info);
367
368 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateGetConnectionInfoFunction);
369 };
370
350 } // namespace api 371 } // namespace api
351 } // namespace extensions 372 } // namespace extensions
352 373
353 #endif // CHROME_BROWSER_EXTENSIONS_API_EASY_UNLOCK_PRIVATE_EASY_UNLOCK_PRIVATE _API_H_ 374 #endif // CHROME_BROWSER_EXTENSIONS_API_EASY_UNLOCK_PRIVATE_EASY_UNLOCK_PRIVATE _API_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698