Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/arc_kiosk_splash_screen_handler.cc

Issue 2701023003: cros: Move call js prefix out of ctor. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/arc_kiosk_splash_screen_handler .h" 5 #include "chrome/browser/ui/webui/chromeos/login/arc_kiosk_splash_screen_handler .h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/values.h" 10 #include "base/values.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 "components/login/localized_values_builder.h" 14 #include "components/login/localized_values_builder.h"
15 #include "ui/base/l10n/l10n_util.h" 15 #include "ui/base/l10n/l10n_util.h"
16 #include "ui/base/resource/resource_bundle.h" 16 #include "ui/base/resource/resource_bundle.h"
17 #include "ui/base/webui/web_ui_util.h" 17 #include "ui/base/webui/web_ui_util.h"
18 #include "ui/gfx/image/image_skia.h" 18 #include "ui/gfx/image/image_skia.h"
19 19
20 namespace { 20 namespace {
21 21
22 constexpr char kJsScreenPath[] = "login.ArcKioskSplashScreen"; 22 constexpr char kJsScreenPath[] = "login.ArcKioskSplashScreen";
23 } 23 }
24 24
25 namespace chromeos { 25 namespace chromeos {
26 26
27 ArcKioskSplashScreenHandler::ArcKioskSplashScreenHandler() 27 ArcKioskSplashScreenHandler::ArcKioskSplashScreenHandler() {
28 : BaseScreenHandler(kJsScreenPath) {} 28 set_call_js_prefix(kJsScreenPath);
29 }
29 30
30 ArcKioskSplashScreenHandler::~ArcKioskSplashScreenHandler() = default; 31 ArcKioskSplashScreenHandler::~ArcKioskSplashScreenHandler() = default;
31 32
32 void ArcKioskSplashScreenHandler::DeclareLocalizedValues( 33 void ArcKioskSplashScreenHandler::DeclareLocalizedValues(
33 ::login::LocalizedValuesBuilder* builder) { 34 ::login::LocalizedValuesBuilder* builder) {
34 builder->Add("arcKioskStartMessage", IDS_APP_START_APP_WAIT_MESSAGE); 35 builder->Add("arcKioskStartMessage", IDS_APP_START_APP_WAIT_MESSAGE);
35 36
36 const base::string16 product_os_name = 37 const base::string16 product_os_name =
37 l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_OS_NAME); 38 l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_OS_NAME);
38 builder->Add("arcKioskShortcutInfo", 39 builder->Add("arcKioskShortcutInfo",
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 112
112 void ArcKioskSplashScreenHandler::HandleCancelArcKioskLaunch() { 113 void ArcKioskSplashScreenHandler::HandleCancelArcKioskLaunch() {
113 if (!delegate_) { 114 if (!delegate_) {
114 LOG(WARNING) << "No delegate set to handle cancel app launch"; 115 LOG(WARNING) << "No delegate set to handle cancel app launch";
115 return; 116 return;
116 } 117 }
117 delegate_->OnCancelArcKioskLaunch(); 118 delegate_->OnCancelArcKioskLaunch();
118 } 119 }
119 120
120 } // namespace chromeos 121 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698