OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_KIOSK_APP_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_APP_MANAGER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_APP_MANAGER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_APP_MANAGER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/callback_forward.h" | 13 #include "base/callback_forward.h" |
14 #include "base/lazy_instance.h" | 14 #include "base/lazy_instance.h" |
15 #include "base/macros.h" | 15 #include "base/macros.h" |
16 #include "base/observer_list.h" | 16 #include "base/observer_list.h" |
17 #include "base/time/time.h" | 17 #include "base/time/time.h" |
18 #include "chrome/browser/chromeos/app_mode/kiosk_app_data_delegate.h" | 18 #include "chrome/browser/chromeos/app_mode/kiosk_app_data_delegate.h" |
19 #include "chrome/browser/chromeos/extensions/external_cache.h" | 19 #include "chrome/browser/chromeos/extensions/external_cache.h" |
20 #include "chrome/browser/chromeos/settings/cros_settings.h" | 20 #include "chrome/browser/chromeos/settings/cros_settings.h" |
21 #include "chrome/browser/chromeos/settings/install_attributes.h" | 21 #include "chrome/browser/chromeos/settings/install_attributes.h" |
22 #include "components/signin/core/account_id/account_id.h" | 22 #include "components/signin/core/account_id/account_id.h" |
23 #include "ui/gfx/image/image_skia.h" | 23 #include "ui/gfx/image/image_skia.h" |
24 | 24 |
25 class GURL; | 25 class GURL; |
26 class PrefRegistrySimple; | 26 class PrefRegistrySimple; |
27 class Profile; | 27 class Profile; |
28 | 28 |
| 29 namespace base { |
| 30 class CommandLine; |
| 31 } |
| 32 |
29 namespace extensions { | 33 namespace extensions { |
30 class Extension; | 34 class Extension; |
31 class ExternalLoader; | 35 class ExternalLoader; |
32 } | 36 } |
33 | 37 |
34 namespace chromeos { | 38 namespace chromeos { |
35 | 39 |
36 class AppSession; | 40 class AppSession; |
37 class KioskAppData; | 41 class KioskAppData; |
38 class KioskAppExternalLoader; | 42 class KioskAppExternalLoader; |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 // Reads/writes auto login state from/to local state. | 314 // Reads/writes auto login state from/to local state. |
311 AutoLoginState GetAutoLoginState() const; | 315 AutoLoginState GetAutoLoginState() const; |
312 void SetAutoLoginState(AutoLoginState state); | 316 void SetAutoLoginState(AutoLoginState state); |
313 | 317 |
314 void GetCrxCacheDir(base::FilePath* cache_dir); | 318 void GetCrxCacheDir(base::FilePath* cache_dir); |
315 void GetCrxUnpackDir(base::FilePath* unpack_dir); | 319 void GetCrxUnpackDir(base::FilePath* unpack_dir); |
316 | 320 |
317 // Returns the auto launch delay. | 321 // Returns the auto launch delay. |
318 base::TimeDelta GetAutoLaunchDelay() const; | 322 base::TimeDelta GetAutoLaunchDelay() const; |
319 | 323 |
| 324 // Gets list of user switches that should be passed to Chrome in case current |
| 325 // session has to be restored, e.g. in case of a crash. The switches will be |
| 326 // returned as |switches| command line arguments. |
| 327 // Returns whether the set of switches would have to be changed in respect to |
| 328 // the current set of switches - if that is not the case |switches| might not |
| 329 // get populated. |
| 330 bool GetSwitchesForSessionRestore(const std::string& app_id, |
| 331 base::CommandLine* switches); |
| 332 |
320 // True if machine ownership is already established. | 333 // True if machine ownership is already established. |
321 bool ownership_established_; | 334 bool ownership_established_; |
322 std::vector<std::unique_ptr<KioskAppData>> apps_; | 335 std::vector<std::unique_ptr<KioskAppData>> apps_; |
323 std::string auto_launch_app_id_; | 336 std::string auto_launch_app_id_; |
324 std::string currently_auto_launched_with_zero_delay_app_; | 337 std::string currently_auto_launched_with_zero_delay_app_; |
325 base::ObserverList<KioskAppManagerObserver, true> observers_; | 338 base::ObserverList<KioskAppManagerObserver, true> observers_; |
326 | 339 |
327 std::unique_ptr<CrosSettings::ObserverSubscription> | 340 std::unique_ptr<CrosSettings::ObserverSubscription> |
328 local_accounts_subscription_; | 341 local_accounts_subscription_; |
329 std::unique_ptr<CrosSettings::ObserverSubscription> | 342 std::unique_ptr<CrosSettings::ObserverSubscription> |
(...skipping 12 matching lines...) Expand all Loading... |
342 base::WeakPtr<KioskAppExternalLoader> secondary_app_external_loader_; | 355 base::WeakPtr<KioskAppExternalLoader> secondary_app_external_loader_; |
343 | 356 |
344 std::unique_ptr<AppSession> app_session_; | 357 std::unique_ptr<AppSession> app_session_; |
345 | 358 |
346 DISALLOW_COPY_AND_ASSIGN(KioskAppManager); | 359 DISALLOW_COPY_AND_ASSIGN(KioskAppManager); |
347 }; | 360 }; |
348 | 361 |
349 } // namespace chromeos | 362 } // namespace chromeos |
350 | 363 |
351 #endif // CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_APP_MANAGER_H_ | 364 #endif // CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_APP_MANAGER_H_ |
OLD | NEW |