OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_CHROMEOS_APP_MODE_ARC_ARC_KIOSK_APP_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_APP_MODE_ARC_ARC_KIOSK_APP_MANAGER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_APP_MODE_ARC_ARC_KIOSK_APP_MANAGER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_APP_MODE_ARC_ARC_KIOSK_APP_MANAGER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
74 const AccountId& GetAutoLaunchAccountId() const; | 74 const AccountId& GetAutoLaunchAccountId() const; |
75 | 75 |
76 // Returns app that should be started for given account id. | 76 // Returns app that should be started for given account id. |
77 const ArcKioskApp* GetAppByAccountId(const AccountId& account_id); | 77 const ArcKioskApp* GetAppByAccountId(const AccountId& account_id); |
78 | 78 |
79 const ArcKioskApps& GetAllApps() const { return apps_; } | 79 const ArcKioskApps& GetAllApps() const { return apps_; } |
80 | 80 |
81 void AddObserver(ArcKioskAppManagerObserver* observer); | 81 void AddObserver(ArcKioskAppManagerObserver* observer); |
82 void RemoveObserver(ArcKioskAppManagerObserver* observer); | 82 void RemoveObserver(ArcKioskAppManagerObserver* observer); |
83 | 83 |
84 bool CurrentAppWasAutoLaunchedWithZeroDelay() const; | |
Luis Héctor Chávez
2017/03/17 17:46:54
this is a trivial accessor, so you can inline it:
Ivan Šandrk
2017/03/20 13:22:58
Done.
| |
85 | |
84 private: | 86 private: |
85 // Updates apps_ based on CrosSettings. | 87 // Updates apps_ based on CrosSettings. |
86 void UpdateApps(); | 88 void UpdateApps(); |
87 | 89 |
88 // Removes cryptohomes of the removed apps. Terminates the session if | 90 // Removes cryptohomes of the removed apps. Terminates the session if |
89 // a removed app is running. | 91 // a removed app is running. |
90 void ClearRemovedApps(const ArcKioskApps& old_apps); | 92 void ClearRemovedApps(const ArcKioskApps& old_apps); |
91 | 93 |
92 ArcKioskApps apps_; | 94 ArcKioskApps apps_; |
93 AccountId auto_launch_account_id_; | 95 AccountId auto_launch_account_id_; |
96 bool auto_launched_with_zero_delay_; | |
94 base::ObserverList<ArcKioskAppManagerObserver, true> observers_; | 97 base::ObserverList<ArcKioskAppManagerObserver, true> observers_; |
95 | 98 |
96 std::unique_ptr<CrosSettings::ObserverSubscription> | 99 std::unique_ptr<CrosSettings::ObserverSubscription> |
97 local_accounts_subscription_; | 100 local_accounts_subscription_; |
98 std::unique_ptr<CrosSettings::ObserverSubscription> | 101 std::unique_ptr<CrosSettings::ObserverSubscription> |
99 local_account_auto_login_id_subscription_; | 102 local_account_auto_login_id_subscription_; |
100 | 103 |
101 DISALLOW_COPY_AND_ASSIGN(ArcKioskAppManager); | 104 DISALLOW_COPY_AND_ASSIGN(ArcKioskAppManager); |
102 }; | 105 }; |
103 | 106 |
104 } // namespace chromeos | 107 } // namespace chromeos |
105 | 108 |
106 #endif // CHROME_BROWSER_CHROMEOS_APP_MODE_ARC_ARC_KIOSK_APP_MANAGER_H_ | 109 #endif // CHROME_BROWSER_CHROMEOS_APP_MODE_ARC_ARC_KIOSK_APP_MANAGER_H_ |
OLD | NEW |