| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_APP_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_SIGNIN_EASY_UNLOCK_APP_MANAGER_H_ |
| 6 #define CHROME_BROWSER_SIGNIN_EASY_UNLOCK_APP_MANAGER_H_ | 6 #define CHROME_BROWSER_SIGNIN_EASY_UNLOCK_APP_MANAGER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 | 13 |
| 14 namespace extensions { | 14 namespace extensions { |
| 15 class ExtensionSystem; | 15 class ExtensionSystem; |
| 16 } | 16 } |
| 17 | 17 |
| 18 namespace user_manager { |
| 19 class UserID; |
| 20 } |
| 21 |
| 18 // Used to manage Easy Unlock app's lifetime and to dispatch events to the app. | 22 // Used to manage Easy Unlock app's lifetime and to dispatch events to the app. |
| 19 // It's main purpose is to abstract extension system from the rest of easy | 23 // It's main purpose is to abstract extension system from the rest of easy |
| 20 // unlock code. | 24 // unlock code. |
| 21 class EasyUnlockAppManager { | 25 class EasyUnlockAppManager { |
| 22 public: | 26 public: |
| 23 virtual ~EasyUnlockAppManager(); | 27 virtual ~EasyUnlockAppManager(); |
| 24 | 28 |
| 25 // Creates EasyUnlockAppManager object that should be used in production. | 29 // Creates EasyUnlockAppManager object that should be used in production. |
| 26 static scoped_ptr<EasyUnlockAppManager> Create( | 30 static scoped_ptr<EasyUnlockAppManager> Create( |
| 27 extensions::ExtensionSystem* extension_system, | 31 extensions::ExtensionSystem* extension_system, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 39 // Loads Easy Unlock app. | 43 // Loads Easy Unlock app. |
| 40 virtual void LoadApp() = 0; | 44 virtual void LoadApp() = 0; |
| 41 | 45 |
| 42 // Disables Easy Unlock app. | 46 // Disables Easy Unlock app. |
| 43 virtual void DisableAppIfLoaded() = 0; | 47 virtual void DisableAppIfLoaded() = 0; |
| 44 | 48 |
| 45 // Reloads Easy Unlock app. | 49 // Reloads Easy Unlock app. |
| 46 virtual void ReloadApp() = 0; | 50 virtual void ReloadApp() = 0; |
| 47 | 51 |
| 48 // Sends easyUnlockPrivate.onUserInfoUpdate event to Easy Unlock app. | 52 // Sends easyUnlockPrivate.onUserInfoUpdate event to Easy Unlock app. |
| 49 virtual bool SendUserUpdatedEvent(const std::string& user_id, | 53 virtual bool SendUserUpdatedEvent(const user_manager::UserID& user_id, |
| 50 bool is_logged_in, | 54 bool is_logged_in, |
| 51 bool data_ready) = 0; | 55 bool data_ready) = 0; |
| 52 | 56 |
| 53 // Sends screenlockPrivate.onAuthAttempted event to Easy Unlock app. | 57 // Sends screenlockPrivate.onAuthAttempted event to Easy Unlock app. |
| 54 virtual bool SendAuthAttemptEvent() = 0; | 58 virtual bool SendAuthAttemptEvent() = 0; |
| 55 }; | 59 }; |
| 56 | 60 |
| 57 #endif // CHROME_BROWSER_SIGNIN_EASY_UNLOCK_APP_MANAGER_H_ | 61 #endif // CHROME_BROWSER_SIGNIN_EASY_UNLOCK_APP_MANAGER_H_ |
| OLD | NEW |