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

Side by Side Diff: chrome/browser/signin/easy_unlock_service_regular.h

Issue 1096293003: Move screenlock_bridge to components/proximity_auth (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 7 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
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_SIGNIN_EASY_UNLOCK_SERVICE_REGULAR_H_ 5 #ifndef CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_REGULAR_H_
6 #define CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_REGULAR_H_ 6 #define CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_REGULAR_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/prefs/pref_change_registrar.h" 13 #include "base/prefs/pref_change_registrar.h"
14 #include "base/time/time.h" 14 #include "base/time/time.h"
15 #include "chrome/browser/signin/easy_unlock_service.h" 15 #include "chrome/browser/signin/easy_unlock_service.h"
16 #include "chrome/browser/signin/screenlock_bridge.h" 16 #include "components/proximity_auth/screenlock_bridge.h"
17 17
18 #if defined(OS_CHROMEOS) 18 #if defined(OS_CHROMEOS)
19 #include "chrome/browser/chromeos/login/easy_unlock/short_lived_user_context.h" 19 #include "chrome/browser/chromeos/login/easy_unlock/short_lived_user_context.h"
20 #endif 20 #endif
21 21
22 namespace base { 22 namespace base {
23 class DictionaryValue; 23 class DictionaryValue;
24 class ListValue; 24 class ListValue;
25 } 25 }
26 26
27 namespace cryptauth { 27 namespace cryptauth {
28 class ToggleEasyUnlockResponse; 28 class ToggleEasyUnlockResponse;
29 } 29 }
30 30
31 namespace proximity_auth { 31 namespace proximity_auth {
32 class CryptAuthClient; 32 class CryptAuthClient;
33 } 33 }
34 34
35 class EasyUnlockAppManager; 35 class EasyUnlockAppManager;
36 class EasyUnlockToggleFlow; 36 class EasyUnlockToggleFlow;
37 class Profile; 37 class Profile;
38 38
39 // EasyUnlockService instance that should be used for regular, non-signin 39 // EasyUnlockService instance that should be used for regular, non-signin
40 // profiles. 40 // profiles.
41 class EasyUnlockServiceRegular : public EasyUnlockService, 41 class EasyUnlockServiceRegular
42 public ScreenlockBridge::Observer { 42 : public EasyUnlockService,
43 public proximity_auth::ScreenlockBridge::Observer {
43 public: 44 public:
44 explicit EasyUnlockServiceRegular(Profile* profile); 45 explicit EasyUnlockServiceRegular(Profile* profile);
45 ~EasyUnlockServiceRegular() override; 46 ~EasyUnlockServiceRegular() override;
46 47
47 private: 48 private:
48 // EasyUnlockService implementation: 49 // EasyUnlockService implementation:
49 EasyUnlockService::Type GetType() const override; 50 EasyUnlockService::Type GetType() const override;
50 std::string GetUserEmail() const override; 51 std::string GetUserEmail() const override;
51 void LaunchSetup() override; 52 void LaunchSetup() override;
52 const base::DictionaryValue* GetPermitAccess() const override; 53 const base::DictionaryValue* GetPermitAccess() const override;
(...skipping 10 matching lines...) Expand all
63 bool success) const override; 64 bool success) const override;
64 void RecordPasswordLoginEvent(const std::string& user_id) const override; 65 void RecordPasswordLoginEvent(const std::string& user_id) const override;
65 void StartAutoPairing(const AutoPairingResultCallback& callback) override; 66 void StartAutoPairing(const AutoPairingResultCallback& callback) override;
66 void SetAutoPairingResult(bool success, const std::string& error) override; 67 void SetAutoPairingResult(bool success, const std::string& error) override;
67 void InitializeInternal() override; 68 void InitializeInternal() override;
68 void ShutdownInternal() override; 69 void ShutdownInternal() override;
69 bool IsAllowedInternal() const override; 70 bool IsAllowedInternal() const override;
70 void OnWillFinalizeUnlock(bool success) override; 71 void OnWillFinalizeUnlock(bool success) override;
71 void OnSuspendDone() override; 72 void OnSuspendDone() override;
72 73
73 // ScreenlockBridge::Observer implementation: 74 // proximity_auth::ScreenlockBridge::Observer implementation:
74 void OnScreenDidLock( 75 void OnScreenDidLock(proximity_auth::ScreenlockBridge::LockHandler::ScreenType
75 ScreenlockBridge::LockHandler::ScreenType screen_type) override; 76 screen_type) override;
76 void OnScreenDidUnlock( 77 void OnScreenDidUnlock(
77 ScreenlockBridge::LockHandler::ScreenType screen_type) override; 78 proximity_auth::ScreenlockBridge::LockHandler::ScreenType screen_type)
79 override;
78 void OnFocusedUserChanged(const std::string& user_id) override; 80 void OnFocusedUserChanged(const std::string& user_id) override;
79 81
80 82
81 // Callback when the controlling pref changes. 83 // Callback when the controlling pref changes.
82 void OnPrefsChanged(); 84 void OnPrefsChanged();
83 85
84 // Sets the new turn-off flow status. 86 // Sets the new turn-off flow status.
85 void SetTurnOffFlowStatus(TurnOffFlowStatus status); 87 void SetTurnOffFlowStatus(TurnOffFlowStatus status);
86 88
87 // Callback for ToggleEasyUnlock CryptAuth API. 89 // Callback for ToggleEasyUnlock CryptAuth API.
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 // sleep -- e.g. by opening the lid -- but can also be shown if the screen is 126 // sleep -- e.g. by opening the lid -- but can also be shown if the screen is
125 // locked but the computer does not go to sleep. 127 // locked but the computer does not go to sleep.
126 base::TimeTicks lock_screen_last_shown_timestamp_; 128 base::TimeTicks lock_screen_last_shown_timestamp_;
127 129
128 base::WeakPtrFactory<EasyUnlockServiceRegular> weak_ptr_factory_; 130 base::WeakPtrFactory<EasyUnlockServiceRegular> weak_ptr_factory_;
129 131
130 DISALLOW_COPY_AND_ASSIGN(EasyUnlockServiceRegular); 132 DISALLOW_COPY_AND_ASSIGN(EasyUnlockServiceRegular);
131 }; 133 };
132 134
133 #endif // CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_REGULAR_H_ 135 #endif // CHROME_BROWSER_SIGNIN_EASY_UNLOCK_SERVICE_REGULAR_H_
OLDNEW
« no previous file with comments | « chrome/browser/signin/easy_unlock_service.cc ('k') | chrome/browser/signin/easy_unlock_service_regular.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698