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

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

Issue 878253002: LocalizedValuesBuilder moved to components/login. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed dependency on 'base'. Created 5 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 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/kiosk_enable_screen_handler.h" 5 #include "chrome/browser/ui/webui/chromeos/login/kiosk_enable_screen_handler.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
11 #include "chrome/common/chrome_switches.h" 11 #include "chrome/common/chrome_switches.h"
12 #include "chrome/grit/generated_resources.h" 12 #include "chrome/grit/generated_resources.h"
13 #include "components/login/localized_values_builder.h"
13 #include "content/public/browser/notification_details.h" 14 #include "content/public/browser/notification_details.h"
14 #include "content/public/browser/notification_service.h" 15 #include "content/public/browser/notification_service.h"
15 16
16 namespace { 17 namespace {
17 18
18 const char kJsScreenPath[] = "login.KioskEnableScreen"; 19 const char kJsScreenPath[] = "login.KioskEnableScreen";
19 20
20 // Reset screen id. 21 // Reset screen id.
21 const char kKioskEnableScreen[] = "kiosk-enable"; 22 const char kKioskEnableScreen[] = "kiosk-enable";
22 23
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 content::NotificationService::NoDetails()); 67 content::NotificationService::NoDetails());
67 } 68 }
68 69
69 void KioskEnableScreenHandler::SetDelegate(Delegate* delegate) { 70 void KioskEnableScreenHandler::SetDelegate(Delegate* delegate) {
70 delegate_ = delegate; 71 delegate_ = delegate;
71 if (page_is_ready()) 72 if (page_is_ready())
72 Initialize(); 73 Initialize();
73 } 74 }
74 75
75 void KioskEnableScreenHandler::DeclareLocalizedValues( 76 void KioskEnableScreenHandler::DeclareLocalizedValues(
76 LocalizedValuesBuilder* builder) { 77 ::login::LocalizedValuesBuilder* builder) {
77 builder->Add("kioskEnableTitle", IDS_KIOSK_ENABLE_SCREEN_WARNING); 78 builder->Add("kioskEnableTitle", IDS_KIOSK_ENABLE_SCREEN_WARNING);
78 builder->Add("kioskEnableWarningText", 79 builder->Add("kioskEnableWarningText",
79 IDS_KIOSK_ENABLE_SCREEN_WARNING); 80 IDS_KIOSK_ENABLE_SCREEN_WARNING);
80 builder->Add("kioskEnableWarningDetails", 81 builder->Add("kioskEnableWarningDetails",
81 IDS_KIOSK_ENABLE_SCREEN_WARNING_DETAILS); 82 IDS_KIOSK_ENABLE_SCREEN_WARNING_DETAILS);
82 builder->Add("kioskEnableButton", IDS_KIOSK_ENABLE_SCREEN_ENABLE_BUTTON); 83 builder->Add("kioskEnableButton", IDS_KIOSK_ENABLE_SCREEN_ENABLE_BUTTON);
83 builder->Add("kioskCancelButton", IDS_CANCEL); 84 builder->Add("kioskCancelButton", IDS_CANCEL);
84 builder->Add("kioskOKButton", IDS_OK); 85 builder->Add("kioskOKButton", IDS_OK);
85 builder->Add("kioskEnableSuccessMsg", IDS_KIOSK_ENABLE_SCREEN_SUCCESS); 86 builder->Add("kioskEnableSuccessMsg", IDS_KIOSK_ENABLE_SCREEN_SUCCESS);
86 builder->Add("kioskEnableErrorMsg", IDS_KIOSK_ENABLE_SCREEN_ERROR); 87 builder->Add("kioskEnableErrorMsg", IDS_KIOSK_ENABLE_SCREEN_ERROR);
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 CallJS("onCompleted", success); 138 CallJS("onCompleted", success);
138 if (success) { 139 if (success) {
139 content::NotificationService::current()->Notify( 140 content::NotificationService::current()->Notify(
140 chrome::NOTIFICATION_KIOSK_ENABLED, 141 chrome::NOTIFICATION_KIOSK_ENABLED,
141 content::NotificationService::AllSources(), 142 content::NotificationService::AllSources(),
142 content::NotificationService::NoDetails()); 143 content::NotificationService::NoDetails());
143 } 144 }
144 } 145 }
145 146
146 } // namespace chromeos 147 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698