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 #include "chrome/browser/ui/webui/chromeos/login/app_launch_splash_screen_handle
r.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/app_launch_splash_screen_handle
r.h" |
6 | 6 |
7 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" | 7 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" |
8 #include "chrome/browser/chromeos/login/screens/error_screen_actor.h" | 8 #include "chrome/browser/chromeos/login/screens/error_screen_actor.h" |
9 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" | 9 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" |
| 10 #include "chrome/grit/chromium_strings.h" |
| 11 #include "chrome/grit/generated_resources.h" |
10 #include "chromeos/network/network_state.h" | 12 #include "chromeos/network/network_state.h" |
11 #include "chromeos/network/network_state_handler.h" | 13 #include "chromeos/network/network_state_handler.h" |
12 #include "grit/browser_resources.h" | 14 #include "grit/browser_resources.h" |
13 #include "grit/chrome_unscaled_resources.h" | 15 #include "grit/chrome_unscaled_resources.h" |
14 #include "grit/chromium_strings.h" | |
15 #include "grit/generated_resources.h" | |
16 #include "ui/base/l10n/l10n_util.h" | 16 #include "ui/base/l10n/l10n_util.h" |
17 #include "ui/base/resource/resource_bundle.h" | 17 #include "ui/base/resource/resource_bundle.h" |
18 #include "ui/base/webui/web_ui_util.h" | 18 #include "ui/base/webui/web_ui_util.h" |
19 | 19 |
20 namespace { | 20 namespace { |
21 | 21 |
22 const char kJsScreenPath[] = "login.AppLaunchSplashScreen"; | 22 const char kJsScreenPath[] = "login.AppLaunchSplashScreen"; |
23 | 23 |
24 // Returns network name by service path. | 24 // Returns network name by service path. |
25 std::string GetNetworkName(const std::string& service_path) { | 25 std::string GetNetworkName(const std::string& service_path) { |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 case NetworkStateInformer::ONLINE: { | 175 case NetworkStateInformer::ONLINE: { |
176 error_screen_actor_->SetErrorState( | 176 error_screen_actor_->SetErrorState( |
177 ErrorScreen::ERROR_STATE_KIOSK_ONLINE, network_name); | 177 ErrorScreen::ERROR_STATE_KIOSK_ONLINE, network_name); |
178 break; | 178 break; |
179 } | 179 } |
180 default: | 180 default: |
181 error_screen_actor_->SetErrorState( | 181 error_screen_actor_->SetErrorState( |
182 ErrorScreen::ERROR_STATE_OFFLINE, network_name); | 182 ErrorScreen::ERROR_STATE_OFFLINE, network_name); |
183 NOTREACHED(); | 183 NOTREACHED(); |
184 break; | 184 break; |
185 }; | 185 } |
186 | 186 |
187 OobeUI::Screen screen = OobeUI::SCREEN_UNKNOWN; | 187 OobeUI::Screen screen = OobeUI::SCREEN_UNKNOWN; |
188 OobeUI* oobe_ui = static_cast<OobeUI*>(web_ui()->GetController()); | 188 OobeUI* oobe_ui = static_cast<OobeUI*>(web_ui()->GetController()); |
189 if (oobe_ui) | 189 if (oobe_ui) |
190 screen = oobe_ui->current_screen(); | 190 screen = oobe_ui->current_screen(); |
191 | 191 |
192 if (screen != OobeUI::SCREEN_ERROR_MESSAGE) | 192 if (screen != OobeUI::SCREEN_ERROR_MESSAGE) |
193 error_screen_actor_->Show(OobeDisplay::SCREEN_APP_LAUNCH_SPLASH, NULL); | 193 error_screen_actor_->Show(OobeDisplay::SCREEN_APP_LAUNCH_SPLASH, NULL); |
194 } | 194 } |
195 | 195 |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 DCHECK(online_state_); | 283 DCHECK(online_state_); |
284 if (delegate_ && online_state_) { | 284 if (delegate_ && online_state_) { |
285 network_config_requested_ = false; | 285 network_config_requested_ = false; |
286 network_config_done_ = true; | 286 network_config_done_ = true; |
287 delegate_->OnNetworkConfigRequested(false); | 287 delegate_->OnNetworkConfigRequested(false); |
288 Show(app_id_); | 288 Show(app_id_); |
289 } | 289 } |
290 } | 290 } |
291 | 291 |
292 } // namespace chromeos | 292 } // namespace chromeos |
OLD | NEW |