OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_SCREENLOCK_PRIVATE_SCREENLOCK_PRIVATE_API_
H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_SCREENLOCK_PRIVATE_SCREENLOCK_PRIVATE_API_
H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_SCREENLOCK_PRIVATE_SCREENLOCK_PRIVATE_API_
H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_SCREENLOCK_PRIVATE_SCREENLOCK_PRIVATE_API_
H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 DISALLOW_COPY_AND_ASSIGN(ScreenlockPrivateAcceptAuthAttemptFunction); | 53 DISALLOW_COPY_AND_ASSIGN(ScreenlockPrivateAcceptAuthAttemptFunction); |
54 }; | 54 }; |
55 | 55 |
56 class ScreenlockPrivateEventRouter | 56 class ScreenlockPrivateEventRouter |
57 : public BrowserContextKeyedAPI, | 57 : public BrowserContextKeyedAPI, |
58 public proximity_auth::ScreenlockBridge::Observer { | 58 public proximity_auth::ScreenlockBridge::Observer { |
59 public: | 59 public: |
60 explicit ScreenlockPrivateEventRouter(content::BrowserContext* context); | 60 explicit ScreenlockPrivateEventRouter(content::BrowserContext* context); |
61 ~ScreenlockPrivateEventRouter() override; | 61 ~ScreenlockPrivateEventRouter() override; |
62 | 62 |
63 bool OnAuthAttempted( | 63 bool OnAuthAttempted(proximity_auth::mojom::AuthType auth_type, |
64 proximity_auth::ScreenlockBridge::LockHandler::AuthType auth_type, | 64 const std::string& value); |
65 const std::string& value); | |
66 | 65 |
67 // BrowserContextKeyedAPI | 66 // BrowserContextKeyedAPI |
68 static BrowserContextKeyedAPIFactory<ScreenlockPrivateEventRouter>* | 67 static BrowserContextKeyedAPIFactory<ScreenlockPrivateEventRouter>* |
69 GetFactoryInstance(); | 68 GetFactoryInstance(); |
70 void Shutdown() override; | 69 void Shutdown() override; |
71 | 70 |
72 private: | 71 private: |
73 friend class BrowserContextKeyedAPIFactory<ScreenlockPrivateEventRouter>; | 72 friend class BrowserContextKeyedAPIFactory<ScreenlockPrivateEventRouter>; |
74 | 73 |
75 // proximity_auth::ScreenlockBridge::Observer | 74 // proximity_auth::ScreenlockBridge::Observer |
(...skipping 15 matching lines...) Expand all Loading... |
91 const std::string& event_name, | 90 const std::string& event_name, |
92 std::unique_ptr<base::Value> arg); | 91 std::unique_ptr<base::Value> arg); |
93 | 92 |
94 content::BrowserContext* browser_context_; | 93 content::BrowserContext* browser_context_; |
95 DISALLOW_COPY_AND_ASSIGN(ScreenlockPrivateEventRouter); | 94 DISALLOW_COPY_AND_ASSIGN(ScreenlockPrivateEventRouter); |
96 }; | 95 }; |
97 | 96 |
98 } // namespace extensions | 97 } // namespace extensions |
99 | 98 |
100 #endif // CHROME_BROWSER_EXTENSIONS_API_SCREENLOCK_PRIVATE_SCREENLOCK_PRIVATE_A
PI_H_ | 99 #endif // CHROME_BROWSER_EXTENSIONS_API_SCREENLOCK_PRIVATE_SCREENLOCK_PRIVATE_A
PI_H_ |
OLD | NEW |