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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 // Whether the network could be configured during launching. | 78 // Whether the network could be configured during launching. |
79 bool CanConfigureNetwork(); | 79 bool CanConfigureNetwork(); |
80 | 80 |
81 // Whether the owner password is needed to configure network. | 81 // Whether the owner password is needed to configure network. |
82 bool NeedOwnerAuthToConfigureNetwork(); | 82 bool NeedOwnerAuthToConfigureNetwork(); |
83 | 83 |
84 // Show network configuration UI if it is allowed. For consumer mode, | 84 // Show network configuration UI if it is allowed. For consumer mode, |
85 // owner password might be checked before showing the network configure UI. | 85 // owner password might be checked before showing the network configure UI. |
86 void MaybeShowNetworkConfigureUI(); | 86 void MaybeShowNetworkConfigureUI(); |
87 | 87 |
| 88 // Show network configuration UI when ready (i.e. after app profile is |
| 89 // loaded). |
| 90 void ShowNetworkConfigureUIWhenReady(); |
| 91 |
88 // KioskProfileLoader::Delegate overrides: | 92 // KioskProfileLoader::Delegate overrides: |
89 void OnProfileLoaded(Profile* profile) override; | 93 void OnProfileLoaded(Profile* profile) override; |
90 void OnProfileLoadFailed(KioskAppLaunchError::Error error) override; | 94 void OnProfileLoadFailed(KioskAppLaunchError::Error error) override; |
91 | 95 |
92 // AppLaunchSplashScreenActor::Delegate overrides: | 96 // AppLaunchSplashScreenActor::Delegate overrides: |
93 void OnConfigureNetwork() override; | 97 void OnConfigureNetwork() override; |
94 void OnCancelAppLaunch() override; | 98 void OnCancelAppLaunch() override; |
95 void OnNetworkConfigRequested(bool requested) override; | 99 void OnNetworkConfigRequested(bool requested) override; |
96 void OnNetworkStateChanged(bool online) override; | 100 void OnNetworkStateChanged(bool online) override; |
97 | 101 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 bool launcher_ready_ = false; | 134 bool launcher_ready_ = false; |
131 | 135 |
132 // A timer to ensure the app splash is shown for a minimum amount of time. | 136 // A timer to ensure the app splash is shown for a minimum amount of time. |
133 base::OneShotTimer splash_wait_timer_; | 137 base::OneShotTimer splash_wait_timer_; |
134 | 138 |
135 base::OneShotTimer network_wait_timer_; | 139 base::OneShotTimer network_wait_timer_; |
136 bool waiting_for_network_ = false; | 140 bool waiting_for_network_ = false; |
137 bool network_wait_timedout_ = false; | 141 bool network_wait_timedout_ = false; |
138 bool showing_network_dialog_ = false; | 142 bool showing_network_dialog_ = false; |
139 bool network_config_requested_ = false; | 143 bool network_config_requested_ = false; |
| 144 bool show_network_config_ui_after_profile_load_ = false; |
140 int64_t launch_splash_start_time_ = 0; | 145 int64_t launch_splash_start_time_ = 0; |
141 | 146 |
142 static bool skip_splash_wait_; | 147 static bool skip_splash_wait_; |
143 static int network_wait_time_; | 148 static int network_wait_time_; |
144 static base::Closure* network_timeout_callback_; | 149 static base::Closure* network_timeout_callback_; |
145 static ReturnBoolCallback* can_configure_network_callback_; | 150 static ReturnBoolCallback* can_configure_network_callback_; |
146 static ReturnBoolCallback* need_owner_auth_to_configure_network_callback_; | 151 static ReturnBoolCallback* need_owner_auth_to_configure_network_callback_; |
147 | 152 |
148 DISALLOW_COPY_AND_ASSIGN(AppLaunchController); | 153 DISALLOW_COPY_AND_ASSIGN(AppLaunchController); |
149 }; | 154 }; |
150 | 155 |
151 } // namespace chromeos | 156 } // namespace chromeos |
152 | 157 |
153 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_APP_LAUNCH_CONTROLLER_H_ | 158 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_APP_LAUNCH_CONTROLLER_H_ |
OLD | NEW |