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

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

Issue 2561203002: Migrate weave-related classes from proximity_auth/ble to cryptauth/ble. (Closed)
Patch Set: Rebase. Created 4 years 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
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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 10 matching lines...) Expand all
21 21
22 namespace base { 22 namespace base {
23 class Timer; 23 class Timer;
24 } 24 }
25 25
26 namespace content { 26 namespace content {
27 class BrowserContext; 27 class BrowserContext;
28 } 28 }
29 29
30 namespace cryptauth { 30 namespace cryptauth {
31 class BluetoothThrottler;
32 class Connection;
31 class ExternalDeviceInfo; 33 class ExternalDeviceInfo;
32 class SecureMessageDelegate; 34 class SecureMessageDelegate;
33 } 35 }
34 36
35 namespace proximity_auth { 37 namespace proximity_auth {
36 class Connection;
37 class BluetoothLowEnergyConnectionFinder; 38 class BluetoothLowEnergyConnectionFinder;
38 class BluetoothThrottler;
39 } 39 }
40 40
41 namespace extensions { 41 namespace extensions {
42 42
43 class EasyUnlockPrivateConnectionManager; 43 class EasyUnlockPrivateConnectionManager;
44 class EasyUnlockPrivateCryptoDelegate; 44 class EasyUnlockPrivateCryptoDelegate;
45 45
46 class EasyUnlockPrivateAPI : public BrowserContextKeyedAPI { 46 class EasyUnlockPrivateAPI : public BrowserContextKeyedAPI {
47 public: 47 public:
48 static BrowserContextKeyedAPIFactory<EasyUnlockPrivateAPI>* 48 static BrowserContextKeyedAPIFactory<EasyUnlockPrivateAPI>*
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 EasyUnlockPrivateFindSetupConnectionFunction(); 470 EasyUnlockPrivateFindSetupConnectionFunction();
471 471
472 private: 472 private:
473 ~EasyUnlockPrivateFindSetupConnectionFunction() override; 473 ~EasyUnlockPrivateFindSetupConnectionFunction() override;
474 474
475 // AsyncExtensionFunction: 475 // AsyncExtensionFunction:
476 bool RunAsync() override; 476 bool RunAsync() override;
477 477
478 // Called when the connection with the remote device advertising the setup 478 // Called when the connection with the remote device advertising the setup
479 // service was found. 479 // service was found.
480 void OnConnectionFound( 480 void OnConnectionFound(std::unique_ptr<cryptauth::Connection> connection);
481 std::unique_ptr<proximity_auth::Connection> connection);
482 481
483 // Callback when waiting for |connection_finder_| to return. 482 // Callback when waiting for |connection_finder_| to return.
484 void OnConnectionFinderTimedOut(); 483 void OnConnectionFinderTimedOut();
485 484
486 // The BLE connection finder instance. 485 // The BLE connection finder instance.
487 std::unique_ptr<proximity_auth::BluetoothLowEnergyConnectionFinder> 486 std::unique_ptr<proximity_auth::BluetoothLowEnergyConnectionFinder>
488 connection_finder_; 487 connection_finder_;
489 488
490 // The connection throttler passed to the BLE connection finder. 489 // The connection throttler passed to the BLE connection finder.
491 std::unique_ptr<proximity_auth::BluetoothThrottler> bluetooth_throttler_; 490 std::unique_ptr<cryptauth::BluetoothThrottler> bluetooth_throttler_;
492 491
493 // Used for timing out when waiting for the connection finder to return. 492 // Used for timing out when waiting for the connection finder to return.
494 std::unique_ptr<base::Timer> timer_; 493 std::unique_ptr<base::Timer> timer_;
495 494
496 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateFindSetupConnectionFunction); 495 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateFindSetupConnectionFunction);
497 }; 496 };
498 497
499 class EasyUnlockPrivateSetupConnectionStatusFunction 498 class EasyUnlockPrivateSetupConnectionStatusFunction
500 : public UIThreadExtensionFunction { 499 : public UIThreadExtensionFunction {
501 public: 500 public:
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 // ExtensionFunction: 557 // ExtensionFunction:
559 ResponseAction Run() override; 558 ResponseAction Run() override;
560 559
561 DISALLOW_COPY_AND_ASSIGN( 560 DISALLOW_COPY_AND_ASSIGN(
562 EasyUnlockPrivateSetupConnectionGetDeviceAddressFunction); 561 EasyUnlockPrivateSetupConnectionGetDeviceAddressFunction);
563 }; 562 };
564 563
565 } // namespace extensions 564 } // namespace extensions
566 565
567 #endif // CHROME_BROWSER_EXTENSIONS_API_EASY_UNLOCK_PRIVATE_EASY_UNLOCK_PRIVATE _API_H_ 566 #endif // CHROME_BROWSER_EXTENSIONS_API_EASY_UNLOCK_PRIVATE_EASY_UNLOCK_PRIVATE _API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698