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