| 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_LOGIN_APP_LAUNCH_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_APP_LAUNCH_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_APP_LAUNCH_CONTROLLER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_APP_LAUNCH_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 public AppLaunchSigninScreen::Delegate, | 36 public AppLaunchSigninScreen::Delegate, |
| 37 public content::NotificationObserver { | 37 public content::NotificationObserver { |
| 38 public: | 38 public: |
| 39 typedef base::Callback<bool()> ReturnBoolCallback; | 39 typedef base::Callback<bool()> ReturnBoolCallback; |
| 40 | 40 |
| 41 AppLaunchController(const std::string& app_id, | 41 AppLaunchController(const std::string& app_id, |
| 42 bool diagnostic_mode, | 42 bool diagnostic_mode, |
| 43 LoginDisplayHost* host, | 43 LoginDisplayHost* host, |
| 44 OobeDisplay* oobe_display); | 44 OobeDisplay* oobe_display); |
| 45 | 45 |
| 46 virtual ~AppLaunchController(); | 46 ~AppLaunchController() override; |
| 47 | 47 |
| 48 void StartAppLaunch(); | 48 void StartAppLaunch(); |
| 49 | 49 |
| 50 bool waiting_for_network() { return waiting_for_network_; } | 50 bool waiting_for_network() { return waiting_for_network_; } |
| 51 bool network_wait_timedout() { return network_wait_timedout_; } | 51 bool network_wait_timedout() { return network_wait_timedout_; } |
| 52 bool showing_network_dialog() { return showing_network_dialog_; } | 52 bool showing_network_dialog() { return showing_network_dialog_; } |
| 53 | 53 |
| 54 // Customize controller for testing purposes. | 54 // Customize controller for testing purposes. |
| 55 static void SkipSplashWaitForTesting(); | 55 static void SkipSplashWaitForTesting(); |
| 56 static void SetNetworkTimeoutCallbackForTesting(base::Closure* callback); | 56 static void SetNetworkTimeoutCallbackForTesting(base::Closure* callback); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 74 bool CanConfigureNetwork(); | 74 bool CanConfigureNetwork(); |
| 75 | 75 |
| 76 // Whether the owner password is needed to configure network. | 76 // Whether the owner password is needed to configure network. |
| 77 bool NeedOwnerAuthToConfigureNetwork(); | 77 bool NeedOwnerAuthToConfigureNetwork(); |
| 78 | 78 |
| 79 // Show network configuration UI if it is allowed. For consumer mode, | 79 // Show network configuration UI if it is allowed. For consumer mode, |
| 80 // owner password might be checked before showing the network configure UI. | 80 // owner password might be checked before showing the network configure UI. |
| 81 void MaybeShowNetworkConfigureUI(); | 81 void MaybeShowNetworkConfigureUI(); |
| 82 | 82 |
| 83 // KioskProfileLoader::Delegate overrides: | 83 // KioskProfileLoader::Delegate overrides: |
| 84 virtual void OnProfileLoaded(Profile* profile) override; | 84 void OnProfileLoaded(Profile* profile) override; |
| 85 virtual void OnProfileLoadFailed(KioskAppLaunchError::Error error) override; | 85 void OnProfileLoadFailed(KioskAppLaunchError::Error error) override; |
| 86 | 86 |
| 87 // AppLaunchSplashScreenActor::Delegate overrides: | 87 // AppLaunchSplashScreenActor::Delegate overrides: |
| 88 virtual void OnConfigureNetwork() override; | 88 void OnConfigureNetwork() override; |
| 89 virtual void OnCancelAppLaunch() override; | 89 void OnCancelAppLaunch() override; |
| 90 virtual void OnNetworkConfigRequested(bool requested) override; | 90 void OnNetworkConfigRequested(bool requested) override; |
| 91 virtual void OnNetworkStateChanged(bool online) override; | 91 void OnNetworkStateChanged(bool online) override; |
| 92 | 92 |
| 93 // StartupAppLauncher::Delegate overrides: | 93 // StartupAppLauncher::Delegate overrides: |
| 94 virtual void InitializeNetwork() override; | 94 void InitializeNetwork() override; |
| 95 virtual bool IsNetworkReady() override; | 95 bool IsNetworkReady() override; |
| 96 virtual void OnLoadingOAuthFile() override; | 96 void OnLoadingOAuthFile() override; |
| 97 virtual void OnInitializingTokenService() override; | 97 void OnInitializingTokenService() override; |
| 98 virtual void OnInstallingApp() override; | 98 void OnInstallingApp() override; |
| 99 virtual void OnReadyToLaunch() override; | 99 void OnReadyToLaunch() override; |
| 100 virtual void OnLaunchSucceeded() override; | 100 void OnLaunchSucceeded() override; |
| 101 virtual void OnLaunchFailed(KioskAppLaunchError::Error error) override; | 101 void OnLaunchFailed(KioskAppLaunchError::Error error) override; |
| 102 virtual bool IsShowingNetworkConfigScreen() override; | 102 bool IsShowingNetworkConfigScreen() override; |
| 103 | 103 |
| 104 // AppLaunchSigninScreen::Delegate overrides: | 104 // AppLaunchSigninScreen::Delegate overrides: |
| 105 virtual void OnOwnerSigninSuccess() override; | 105 void OnOwnerSigninSuccess() override; |
| 106 | 106 |
| 107 // content::NotificationObserver overrides: | 107 // content::NotificationObserver overrides: |
| 108 virtual void Observe(int type, | 108 void Observe(int type, |
| 109 const content::NotificationSource& source, | 109 const content::NotificationSource& source, |
| 110 const content::NotificationDetails& details) override; | 110 const content::NotificationDetails& details) override; |
| 111 | 111 |
| 112 Profile* profile_; | 112 Profile* profile_; |
| 113 const std::string app_id_; | 113 const std::string app_id_; |
| 114 const bool diagnostic_mode_; | 114 const bool diagnostic_mode_; |
| 115 LoginDisplayHost* host_; | 115 LoginDisplayHost* host_; |
| 116 OobeDisplay* oobe_display_; | 116 OobeDisplay* oobe_display_; |
| 117 AppLaunchSplashScreenActor* app_launch_splash_screen_actor_; | 117 AppLaunchSplashScreenActor* app_launch_splash_screen_actor_; |
| 118 scoped_ptr<KioskProfileLoader> kiosk_profile_loader_; | 118 scoped_ptr<KioskProfileLoader> kiosk_profile_loader_; |
| 119 scoped_ptr<StartupAppLauncher> startup_app_launcher_; | 119 scoped_ptr<StartupAppLauncher> startup_app_launcher_; |
| 120 scoped_ptr<AppLaunchSigninScreen> signin_screen_; | 120 scoped_ptr<AppLaunchSigninScreen> signin_screen_; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 139 static base::Closure* network_timeout_callback_; | 139 static base::Closure* network_timeout_callback_; |
| 140 static ReturnBoolCallback* can_configure_network_callback_; | 140 static ReturnBoolCallback* can_configure_network_callback_; |
| 141 static ReturnBoolCallback* need_owner_auth_to_configure_network_callback_; | 141 static ReturnBoolCallback* need_owner_auth_to_configure_network_callback_; |
| 142 | 142 |
| 143 DISALLOW_COPY_AND_ASSIGN(AppLaunchController); | 143 DISALLOW_COPY_AND_ASSIGN(AppLaunchController); |
| 144 }; | 144 }; |
| 145 | 145 |
| 146 } // namespace chromeos | 146 } // namespace chromeos |
| 147 | 147 |
| 148 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_APP_LAUNCH_CONTROLLER_H_ | 148 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_APP_LAUNCH_CONTROLLER_H_ |
| OLD | NEW |