Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / chrome / browser / signin / easy_unlock_app_manager.h
blob1b7ac8b0f0d7116d47c1731abddef5b86307f0fc
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_SIGNIN_EASY_UNLOCK_APP_MANAGER_H_
6 #define CHROME_BROWSER_SIGNIN_EASY_UNLOCK_APP_MANAGER_H_
8 #include <string>
10 #include "base/callback.h"
11 #include "base/files/file_path.h"
12 #include "base/macros.h"
14 namespace extensions {
15 class ExtensionSystem;
18 // 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
20 // unlock code.
21 class EasyUnlockAppManager {
22 public:
23 virtual ~EasyUnlockAppManager();
25 // Creates EasyUnlockAppManager object that should be used in production.
26 static scoped_ptr<EasyUnlockAppManager> Create(
27 extensions::ExtensionSystem* extension_system,
28 int manifest_id,
29 const base::FilePath& app_path);
31 // Wait for the extension system to get ready and invokes |ready_callback|
32 // when that happens.
33 // Note that the callback may be triggered after |this| is deleted.
34 virtual void EnsureReady(const base::Closure& ready_callback) = 0;
36 // Launches Easy Unlock setup app, if the setup app is loaded.
37 virtual void LaunchSetup() = 0;
39 // Loads Easy Unlock app.
40 virtual void LoadApp() = 0;
42 // Disables Easy Unlock app.
43 virtual void DisableAppIfLoaded() = 0;
45 // Reloads Easy Unlock app.
46 virtual void ReloadApp() = 0;
48 // Sends easyUnlockPrivate.onUserInfoUpdate event to Easy Unlock app.
49 virtual bool SendUserUpdatedEvent(const std::string& user_id,
50 bool is_logged_in,
51 bool data_ready) = 0;
53 // Sends screenlockPrivate.onAuthAttempted event to Easy Unlock app.
54 virtual bool SendAuthAttemptEvent() = 0;
57 #endif // CHROME_BROWSER_SIGNIN_EASY_UNLOCK_APP_MANAGER_H_