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

Side by Side Diff: chrome/browser/chromeos/lock_screen_apps/app_manager.h

Issue 2902293002: Introduce lock screen app manager (Closed)
Patch Set: . Created 3 years, 6 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
(Empty)
1 // Copyright 2017 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.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_LOCK_SCREEN_APPS_APP_MANAGER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOCK_SCREEN_APPS_APP_MANAGER_H_
7
8 #include <string>
9
10 #include "base/callback.h"
11
12 class Profile;
13
14 namespace lock_screen_apps {
15
16 // Interface for managing lock screen enabled action handler apps in the lock
17 // screen enabled profile. Initially, it will be used primarily to manage lock
18 // screen note taking apps.
19 class AppManager {
20 public:
21 virtual ~AppManager() {}
22
23 // Initializes the manager.
24 // |primary_profile| - the profile which is the source of the lock screen
25 // action handler app (if one is set). This is the profile whose
26 // settings are used to determine whether and for which app lock screen
27 // action is enabled.
28 // |lock_screen_profile| - the profile in which lock screen apps should be
29 // installed and launched.
30 virtual void Initialize(Profile* primary_profile,
31 Profile* lock_screen_profile) = 0;
32
33 // Activates the manager - this should ensure that lock screen enabled note
34 // taking app, if available, is loaded and enabled in the lock screen profile.
35 // |note_taking_changed_callback| - used to notify the client when the note
36 // taking app availability changes. It's cleared when the AppManager is
37 // stopped. It is not expected to be run after the app manager instance
38 // is destroyed.
39 virtual void Start(const base::Closure& note_taking_changed_callback) = 0;
40
41 // Stops the manager. After this is called, the app can be unloaded from the
42 // lock screen enabled profile. Subsequent launch requests should not be
43 // allowed.
44 virtual void Stop() = 0;
45
46 // If lock screen note taking app is available, launches the app with lock
47 // screen note taking action.
48 // Returns whether the app launch was attempted.
49 virtual bool LaunchNoteTaking() = 0;
50
51 // Returns whether a lock screen note taking is enabled and ready to launch.
52 virtual bool IsNoteTakingAppAvailable() const = 0;
53
54 // Returns the lock screen enabled lock screen note taking app, if a note
55 // taking app is enabled on lock screen (for primary profile).
56 virtual std::string GetNoteTakingAppId() const = 0;
57 };
58
59 } // namespace lock_screen_apps
60
61 #endif // CHROME_BROWSER_CHROMEOS_LOCK_SCREEN_APPS_APP_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698