OLD | NEW |
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/network_screen_handler.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/network_screen_handler.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "chrome/browser/chromeos/login/ui/input_events_blocker.h" | 22 #include "chrome/browser/chromeos/login/ui/input_events_blocker.h" |
23 #include "chrome/browser/chromeos/system/input_device_settings.h" | 23 #include "chrome/browser/chromeos/system/input_device_settings.h" |
24 #include "chrome/browser/chromeos/system/timezone_util.h" | 24 #include "chrome/browser/chromeos/system/timezone_util.h" |
25 #include "chrome/browser/ui/webui/chromeos/login/l10n_util.h" | 25 #include "chrome/browser/ui/webui/chromeos/login/l10n_util.h" |
26 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" | 26 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" |
27 #include "chrome/common/pref_names.h" | 27 #include "chrome/common/pref_names.h" |
28 #include "chrome/grit/generated_resources.h" | 28 #include "chrome/grit/generated_resources.h" |
29 #include "chromeos/chromeos_switches.h" | 29 #include "chromeos/chromeos_switches.h" |
30 #include "chromeos/network/network_handler.h" | 30 #include "chromeos/network/network_handler.h" |
31 #include "chromeos/network/network_state_handler.h" | 31 #include "chromeos/network/network_state_handler.h" |
| 32 #include "components/login/localized_values_builder.h" |
32 #include "components/user_manager/user_manager.h" | 33 #include "components/user_manager/user_manager.h" |
33 #include "content/public/browser/browser_thread.h" | 34 #include "content/public/browser/browser_thread.h" |
34 #include "ui/base/ime/chromeos/extension_ime_util.h" | 35 #include "ui/base/ime/chromeos/extension_ime_util.h" |
35 #include "ui/base/l10n/l10n_util.h" | 36 #include "ui/base/l10n/l10n_util.h" |
36 #include "ui/gfx/geometry/rect.h" | 37 #include "ui/gfx/geometry/rect.h" |
37 #include "ui/views/layout/fill_layout.h" | 38 #include "ui/views/layout/fill_layout.h" |
38 #include "ui/views/widget/widget.h" | 39 #include "ui/views/widget/widget.h" |
39 | 40 |
40 namespace { | 41 namespace { |
41 const char kJsScreenPath[] = "login.NetworkScreen"; | 42 const char kJsScreenPath[] = "login.NetworkScreen"; |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 void NetworkScreenHandler::ReloadLocalizedContent() { | 132 void NetworkScreenHandler::ReloadLocalizedContent() { |
132 base::DictionaryValue localized_strings; | 133 base::DictionaryValue localized_strings; |
133 static_cast<OobeUI*>(web_ui()->GetController()) | 134 static_cast<OobeUI*>(web_ui()->GetController()) |
134 ->GetLocalizedStrings(&localized_strings); | 135 ->GetLocalizedStrings(&localized_strings); |
135 core_oobe_actor_->ReloadContent(localized_strings); | 136 core_oobe_actor_->ReloadContent(localized_strings); |
136 } | 137 } |
137 | 138 |
138 // NetworkScreenHandler, BaseScreenHandler implementation: -------------------- | 139 // NetworkScreenHandler, BaseScreenHandler implementation: -------------------- |
139 | 140 |
140 void NetworkScreenHandler::DeclareLocalizedValues( | 141 void NetworkScreenHandler::DeclareLocalizedValues( |
141 LocalizedValuesBuilder* builder) { | 142 ::login::LocalizedValuesBuilder* builder) { |
142 if (system::InputDeviceSettings::Get()->ForceKeyboardDrivenUINavigation()) | 143 if (system::InputDeviceSettings::Get()->ForceKeyboardDrivenUINavigation()) |
143 builder->Add("networkScreenGreeting", IDS_REMORA_CONFIRM_MESSAGE); | 144 builder->Add("networkScreenGreeting", IDS_REMORA_CONFIRM_MESSAGE); |
144 else | 145 else |
145 builder->Add("networkScreenGreeting", IDS_WELCOME_SCREEN_GREETING); | 146 builder->Add("networkScreenGreeting", IDS_WELCOME_SCREEN_GREETING); |
146 | 147 |
147 builder->Add("networkScreenTitle", IDS_WELCOME_SCREEN_TITLE); | 148 builder->Add("networkScreenTitle", IDS_WELCOME_SCREEN_TITLE); |
148 builder->Add("networkScreenAccessibleTitle", | 149 builder->Add("networkScreenAccessibleTitle", |
149 IDS_NETWORK_SCREEN_ACCESSIBLE_TITLE); | 150 IDS_NETWORK_SCREEN_ACCESSIBLE_TITLE); |
150 builder->Add("selectLanguage", IDS_LANGUAGE_SELECTION_SELECT); | 151 builder->Add("selectLanguage", IDS_LANGUAGE_SELECTION_SELECT); |
151 builder->Add("selectKeyboard", IDS_KEYBOARD_SELECTION_SELECT); | 152 builder->Add("selectKeyboard", IDS_KEYBOARD_SELECTION_SELECT); |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 timezone_option->SetString("value", timezone_id); | 246 timezone_option->SetString("value", timezone_id); |
246 timezone_option->SetString("title", timezone_name); | 247 timezone_option->SetString("title", timezone_name); |
247 timezone_option->SetBoolean("selected", timezone_id == current_timezone_id); | 248 timezone_option->SetBoolean("selected", timezone_id == current_timezone_id); |
248 timezone_list->Append(timezone_option.release()); | 249 timezone_list->Append(timezone_option.release()); |
249 } | 250 } |
250 | 251 |
251 return timezone_list.release(); | 252 return timezone_list.release(); |
252 } | 253 } |
253 | 254 |
254 } // namespace chromeos | 255 } // namespace chromeos |
OLD | NEW |