Chromium Code Reviews| 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 current_app_was_auto_launched_with_zero_delay() const { | |
| 85 return auto_launched_with_zero_delay_; | |
| 86 } | |
| 87 | |
| 84 private: | 88 private: |
| 85 // Updates apps_ based on CrosSettings. | 89 // Updates apps_ based on CrosSettings. |
| 86 void UpdateApps(); | 90 void UpdateApps(); |
| 87 | 91 |
| 88 // Removes cryptohomes of the removed apps. Terminates the session if | 92 // Removes cryptohomes of the removed apps. Terminates the session if |
| 89 // a removed app is running. | 93 // a removed app is running. |
| 90 void ClearRemovedApps(const ArcKioskApps& old_apps); | 94 void ClearRemovedApps(const ArcKioskApps& old_apps); |
| 91 | 95 |
| 92 ArcKioskApps apps_; | 96 ArcKioskApps apps_; |
| 93 AccountId auto_launch_account_id_; | 97 AccountId auto_launch_account_id_; |
| 98 bool auto_launched_with_zero_delay_; | |
|
achuithb
2017/03/21 00:30:16
nit: initialize this here
Ivan Šandrk
2017/03/21 12:48:05
Done.
| |
| 94 base::ObserverList<ArcKioskAppManagerObserver, true> observers_; | 99 base::ObserverList<ArcKioskAppManagerObserver, true> observers_; |
| 95 | 100 |
| 96 std::unique_ptr<CrosSettings::ObserverSubscription> | 101 std::unique_ptr<CrosSettings::ObserverSubscription> |
| 97 local_accounts_subscription_; | 102 local_accounts_subscription_; |
| 98 std::unique_ptr<CrosSettings::ObserverSubscription> | 103 std::unique_ptr<CrosSettings::ObserverSubscription> |
| 99 local_account_auto_login_id_subscription_; | 104 local_account_auto_login_id_subscription_; |
| 100 | 105 |
| 101 DISALLOW_COPY_AND_ASSIGN(ArcKioskAppManager); | 106 DISALLOW_COPY_AND_ASSIGN(ArcKioskAppManager); |
| 102 }; | 107 }; |
| 103 | 108 |
| 104 } // namespace chromeos | 109 } // namespace chromeos |
| 105 | 110 |
| 106 #endif // CHROME_BROWSER_CHROMEOS_APP_MODE_ARC_ARC_KIOSK_APP_MANAGER_H_ | 111 #endif // CHROME_BROWSER_CHROMEOS_APP_MODE_ARC_ARC_KIOSK_APP_MANAGER_H_ |
| OLD | NEW |