| 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 <utility> | |
| 8 | |
| 9 #include "base/memory/ptr_util.h" | |
| 10 #include "base/values.h" | |
| 11 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" | 7 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" |
| 12 #include "chrome/browser/chromeos/login/oobe_screen.h" | 8 #include "chrome/browser/chromeos/login/oobe_screen.h" |
| 13 #include "chrome/browser/chromeos/login/screens/network_error.h" | 9 #include "chrome/browser/chromeos/login/screens/network_error.h" |
| 14 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" | 10 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" |
| 15 #include "chrome/grit/chrome_unscaled_resources.h" | 11 #include "chrome/grit/chrome_unscaled_resources.h" |
| 16 #include "chrome/grit/chromium_strings.h" | 12 #include "chrome/grit/chromium_strings.h" |
| 17 #include "chrome/grit/generated_resources.h" | 13 #include "chrome/grit/generated_resources.h" |
| 18 #include "chromeos/network/network_state.h" | 14 #include "chromeos/network/network_state.h" |
| 19 #include "chromeos/network/network_state_handler.h" | 15 #include "chromeos/network/network_state_handler.h" |
| 20 #include "components/login/localized_values_builder.h" | 16 #include "components/login/localized_values_builder.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 app_id_ = app_id; | 78 app_id_ = app_id; |
| 83 if (!page_is_ready()) { | 79 if (!page_is_ready()) { |
| 84 show_on_init_ = true; | 80 show_on_init_ = true; |
| 85 return; | 81 return; |
| 86 } | 82 } |
| 87 | 83 |
| 88 base::DictionaryValue data; | 84 base::DictionaryValue data; |
| 89 data.SetBoolean("shortcutEnabled", | 85 data.SetBoolean("shortcutEnabled", |
| 90 !KioskAppManager::Get()->GetDisableBailoutShortcut()); | 86 !KioskAppManager::Get()->GetDisableBailoutShortcut()); |
| 91 | 87 |
| 92 auto app_info = base::MakeUnique<base::DictionaryValue>(); | 88 // |data| will take ownership of |app_info|. |
| 93 PopulateAppInfo(app_info.get()); | 89 base::DictionaryValue *app_info = new base::DictionaryValue(); |
| 94 data.Set("appInfo", std::move(app_info)); | 90 PopulateAppInfo(app_info); |
| 91 data.Set("appInfo", app_info); |
| 95 | 92 |
| 96 SetLaunchText(l10n_util::GetStringUTF8(GetProgressMessageFromState(state_))); | 93 SetLaunchText(l10n_util::GetStringUTF8(GetProgressMessageFromState(state_))); |
| 97 ShowScreenWithData(kScreenId, &data); | 94 ShowScreenWithData(kScreenId, &data); |
| 98 } | 95 } |
| 99 | 96 |
| 100 void AppLaunchSplashScreenHandler::RegisterMessages() { | 97 void AppLaunchSplashScreenHandler::RegisterMessages() { |
| 101 AddCallback("configureNetwork", | 98 AddCallback("configureNetwork", |
| 102 &AppLaunchSplashScreenHandler::HandleConfigureNetwork); | 99 &AppLaunchSplashScreenHandler::HandleConfigureNetwork); |
| 103 AddCallback("cancelAppLaunch", | 100 AddCallback("cancelAppLaunch", |
| 104 &AppLaunchSplashScreenHandler::HandleCancelAppLaunch); | 101 &AppLaunchSplashScreenHandler::HandleCancelAppLaunch); |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 DCHECK(online_state_); | 273 DCHECK(online_state_); |
| 277 if (delegate_ && online_state_) { | 274 if (delegate_ && online_state_) { |
| 278 network_config_requested_ = false; | 275 network_config_requested_ = false; |
| 279 network_config_done_ = true; | 276 network_config_done_ = true; |
| 280 delegate_->OnNetworkConfigRequested(false); | 277 delegate_->OnNetworkConfigRequested(false); |
| 281 Show(app_id_); | 278 Show(app_id_); |
| 282 } | 279 } |
| 283 } | 280 } |
| 284 | 281 |
| 285 } // namespace chromeos | 282 } // namespace chromeos |
| OLD | NEW |