| Index: chrome/browser/chromeos/app_mode/startup_app_launcher.h
|
| diff --git a/chrome/browser/chromeos/app_mode/startup_app_launcher.h b/chrome/browser/chromeos/app_mode/startup_app_launcher.h
|
| index e13225abc98c1911a184e4d9bc8ab469c2330d1d..94aae2394d6dfe5f40bc6b596507a37faf4a07d4 100644
|
| --- a/chrome/browser/chromeos/app_mode/startup_app_launcher.h
|
| +++ b/chrome/browser/chromeos/app_mode/startup_app_launcher.h
|
| @@ -11,12 +11,14 @@
|
| #include "base/memory/ref_counted.h"
|
| #include "base/memory/weak_ptr.h"
|
| #include "chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h"
|
| +#include "chrome/browser/chromeos/app_mode/kiosk_app_manager_observer.h"
|
| +#include "chrome/browser/extensions/install_observer.h"
|
| #include "google_apis/gaia/oauth2_token_service.h"
|
|
|
| class Profile;
|
|
|
| namespace extensions {
|
| -class WebstoreStandaloneInstaller;
|
| +class CrxInstaller;
|
| }
|
|
|
| namespace chromeos {
|
| @@ -31,9 +33,10 @@ namespace chromeos {
|
| // - After the app is installed/updated, launch it and finish the flow;
|
| // Report OnLauncherInitialized() or OnLaunchFailed() to observers:
|
| // - If all goes good, launches the app and finish the flow;
|
| -class StartupAppLauncher
|
| - : public base::SupportsWeakPtr<StartupAppLauncher>,
|
| - public OAuth2TokenService::Observer {
|
| +class StartupAppLauncher : public base::SupportsWeakPtr<StartupAppLauncher>,
|
| + public OAuth2TokenService::Observer,
|
| + public extensions::InstallObserver,
|
| + public KioskAppManagerObserver {
|
| public:
|
| class Delegate {
|
| public:
|
| @@ -92,7 +95,7 @@ class StartupAppLauncher
|
| void OnUpdateCheckFinished();
|
|
|
| void BeginInstall();
|
| - void InstallCallback(bool success, const std::string& error);
|
| + scoped_refptr<extensions::CrxInstaller> CreateCrxInstaller(Profile* profile);
|
| void OnReadyToLaunch();
|
| void UpdateAppData();
|
|
|
| @@ -103,19 +106,32 @@ class StartupAppLauncher
|
| static void LoadOAuthFileOnBlockingPool(KioskOAuthParams* auth_params);
|
| void OnOAuthFileLoaded(KioskOAuthParams* auth_params);
|
|
|
| + void OnKioskAppDataLoadStatusChanged(const std::string& app_id);
|
| +
|
| // OAuth2TokenService::Observer overrides.
|
| virtual void OnRefreshTokenAvailable(const std::string& account_id) OVERRIDE;
|
| virtual void OnRefreshTokensLoaded() OVERRIDE;
|
|
|
| + // extensions::InstallObserver overrides.
|
| + virtual void OnFinishCrxInstall(const std::string& extension_id,
|
| + bool success) OVERRIDE;
|
| +
|
| + // KioskAppManagerObserver overrides.
|
| + virtual void OnKioskAppDataChanged(const std::string& app_id) OVERRIDE;
|
| + virtual void OnKioskAppDataLoadFailure(const std::string& app_id) OVERRIDE;
|
| +
|
| Profile* profile_;
|
| const std::string app_id_;
|
| const bool diagnostic_mode_;
|
| Delegate* delegate_;
|
| bool network_ready_handled_;
|
| - int install_attempt_;
|
| + int download_attempt_;
|
| + int launch_attempt_;
|
| bool ready_to_launch_;
|
| + bool update_check_pending_;
|
| + bool crx_cache_pending_;
|
|
|
| - scoped_refptr<extensions::WebstoreStandaloneInstaller> installer_;
|
| + scoped_refptr<extensions::CrxInstaller> crx_installer_;
|
| KioskOAuthParams auth_params_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(StartupAppLauncher);
|
|
|