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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/eula_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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/eula_screen_handler.h" 5 #include "chrome/browser/ui/webui/chromeos/login/eula_screen_handler.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/chromeos/login/help_app_launcher.h" 10 #include "chrome/browser/chromeos/login/help_app_launcher.h"
11 #include "chrome/browser/chromeos/login/helper.h" 11 #include "chrome/browser/chromeos/login/helper.h"
12 #include "chrome/browser/chromeos/login/screens/core_oobe_actor.h" 12 #include "chrome/browser/chromeos/login/screens/core_oobe_actor.h"
13 #include "chrome/browser/chromeos/login/screens/eula_model.h" 13 #include "chrome/browser/chromeos/login/screens/eula_model.h"
14 #include "chrome/browser/chromeos/login/ui/login_web_dialog.h" 14 #include "chrome/browser/chromeos/login/ui/login_web_dialog.h"
15 #include "chrome/browser/chromeos/login/ui/webui_login_display.h" 15 #include "chrome/browser/chromeos/login/ui/webui_login_display.h"
16 #include "chrome/browser/profiles/profile.h" 16 #include "chrome/browser/profiles/profile.h"
17 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" 17 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
18 #include "chrome/common/url_constants.h" 18 #include "chrome/common/url_constants.h"
19 #include "chrome/grit/chromium_strings.h" 19 #include "chrome/grit/chromium_strings.h"
20 #include "chrome/grit/generated_resources.h" 20 #include "chrome/grit/generated_resources.h"
21 #include "chrome/grit/locale_settings.h" 21 #include "chrome/grit/locale_settings.h"
22 #include "components/login/localized_values_builder.h"
22 #include "content/public/browser/web_contents.h" 23 #include "content/public/browser/web_contents.h"
23 #include "ui/base/l10n/l10n_util.h" 24 #include "ui/base/l10n/l10n_util.h"
24 #include "ui/views/widget/widget.h" 25 #include "ui/views/widget/widget.h"
25 #include "url/gurl.h" 26 #include "url/gurl.h"
26 27
27 namespace { 28 namespace {
28 29
29 const char kJsScreenPath[] = "login.EulaScreen"; 30 const char kJsScreenPath[] = "login.EulaScreen";
30 31
31 // Helper class to tweak display details of credits pages in the context 32 // Helper class to tweak display details of credits pages in the context
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 if (page_is_ready()) 112 if (page_is_ready())
112 Initialize(); 113 Initialize();
113 } 114 }
114 115
115 void EulaScreenHandler::Unbind() { 116 void EulaScreenHandler::Unbind() {
116 model_ = nullptr; 117 model_ = nullptr;
117 BaseScreenHandler::SetBaseScreen(nullptr); 118 BaseScreenHandler::SetBaseScreen(nullptr);
118 } 119 }
119 120
120 void EulaScreenHandler::DeclareLocalizedValues( 121 void EulaScreenHandler::DeclareLocalizedValues(
121 LocalizedValuesBuilder* builder) { 122 ::login::LocalizedValuesBuilder* builder) {
122 builder->Add("eulaScreenTitle", IDS_EULA_SCREEN_TITLE); 123 builder->Add("eulaScreenTitle", IDS_EULA_SCREEN_TITLE);
123 builder->Add("eulaScreenAccessibleTitle", IDS_EULA_SCREEN_ACCESSIBLE_TITLE); 124 builder->Add("eulaScreenAccessibleTitle", IDS_EULA_SCREEN_ACCESSIBLE_TITLE);
124 builder->Add("checkboxLogging", IDS_EULA_CHECKBOX_ENABLE_LOGGING); 125 builder->Add("checkboxLogging", IDS_EULA_CHECKBOX_ENABLE_LOGGING);
125 builder->Add("back", IDS_EULA_BACK_BUTTON); 126 builder->Add("back", IDS_EULA_BACK_BUTTON);
126 builder->Add("acceptAgreement", IDS_EULA_ACCEPT_AND_CONTINUE_BUTTON); 127 builder->Add("acceptAgreement", IDS_EULA_ACCEPT_AND_CONTINUE_BUTTON);
127 builder->Add("eulaSystemInstallationSettings", 128 builder->Add("eulaSystemInstallationSettings",
128 IDS_EULA_SYSTEM_SECURITY_SETTING); 129 IDS_EULA_SYSTEM_SECURITY_SETTING);
129 builder->Add("eulaTpmDesc", IDS_EULA_TPM_DESCRIPTION); 130 builder->Add("eulaTpmDesc", IDS_EULA_TPM_DESCRIPTION);
130 builder->Add("eulaTpmKeyDesc", IDS_EULA_TPM_KEY_DESCRIPTION); 131 builder->Add("eulaTpmKeyDesc", IDS_EULA_TPM_KEY_DESCRIPTION);
131 builder->Add("eulaTpmDescPowerwash", IDS_EULA_TPM_KEY_DESCRIPTION_POWERWASH); 132 builder->Add("eulaTpmDescPowerwash", IDS_EULA_TPM_KEY_DESCRIPTION_POWERWASH);
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 IDS_ABOUT_VERSION_LICENSE_EULA, 209 IDS_ABOUT_VERSION_LICENSE_EULA,
209 GURL(chrome::kChromeUICreditsURL)); 210 GURL(chrome::kChromeUICreditsURL));
210 } 211 }
211 212
212 void EulaScreenHandler::HandleOnInstallationSettingsPopupOpened() { 213 void EulaScreenHandler::HandleOnInstallationSettingsPopupOpened() {
213 if (model_) 214 if (model_)
214 model_->InitiatePasswordFetch(); 215 model_->InitiatePasswordFetch();
215 } 216 }
216 217
217 } // namespace chromeos 218 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698