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

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

Issue 7382001: [ChromeOS] WebUI OOBE/Login refactoring. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync and address comments in set #1 Created 9 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/stringprintf.h" 8 #include "base/stringprintf.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "base/values.h" 10 #include "base/values.h"
11 #include "chrome/browser/browser_process.h" 11 #include "chrome/browser/browser_process.h"
12 #include "chrome/browser/chromeos/cros/cros_library.h" 12 #include "chrome/browser/chromeos/cros/cros_library.h"
13 #include "chrome/browser/chromeos/input_method/input_method_manager.h" 13 #include "chrome/browser/chromeos/input_method/input_method_manager.h"
14 #include "chrome/browser/chromeos/login/language_switch_menu.h" 14 #include "chrome/browser/chromeos/login/language_switch_menu.h"
15 #include "chrome/browser/chromeos/login/webui_login_display.h" 15 #include "chrome/browser/chromeos/login/webui_login_display.h"
16 #include "chrome/browser/chromeos/status/input_method_menu.h" 16 #include "chrome/browser/chromeos/status/input_method_menu.h"
17 #include "chrome/browser/chromeos/status/network_dropdown_button.h" 17 #include "chrome/browser/chromeos/status/network_dropdown_button.h"
18 #include "chrome/browser/chromeos/wm_ipc.h" 18 #include "chrome/browser/chromeos/wm_ipc.h"
19 #include "chrome/browser/ui/webui/options/language_options_handler.h" 19 #include "chrome/browser/ui/webui/options/language_options_handler.h"
20 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
20 #include "content/browser/tab_contents/tab_contents.h" 21 #include "content/browser/tab_contents/tab_contents.h"
21 #include "content/browser/webui/web_ui.h" 22 #include "content/browser/webui/web_ui.h"
22 #include "grit/chromium_strings.h" 23 #include "grit/chromium_strings.h"
23 #include "grit/generated_resources.h" 24 #include "grit/generated_resources.h"
24 #include "ui/base/l10n/l10n_util.h" 25 #include "ui/base/l10n/l10n_util.h"
25 #include "ui/gfx/rect.h" 26 #include "ui/gfx/rect.h"
26 #include "views/layout/fill_layout.h" 27 #include "views/layout/fill_layout.h"
27 #include "views/widget/widget.h" 28 #include "views/widget/widget.h"
28 29
29 namespace { 30 namespace {
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 void NetworkScreenHandler::EnableContinue(bool enabled) { 127 void NetworkScreenHandler::EnableContinue(bool enabled) {
127 is_continue_enabled_ = enabled; 128 is_continue_enabled_ = enabled;
128 if (!page_is_ready()) 129 if (!page_is_ready())
129 return; 130 return;
130 131
131 scoped_ptr<Value> enabled_value(Value::CreateBooleanValue(enabled)); 132 scoped_ptr<Value> enabled_value(Value::CreateBooleanValue(enabled));
132 web_ui_->CallJavascriptFunction("cr.ui.Oobe.enableContinueButton", 133 web_ui_->CallJavascriptFunction("cr.ui.Oobe.enableContinueButton",
133 *enabled_value); 134 *enabled_value);
134 } 135 }
135 136
136 // NetworkScreenHandler, OobeMessageHandler implementation: -------------------- 137 // NetworkScreenHandler, BaseScreenHandler implementation: --------------------
137 138
138 void NetworkScreenHandler::GetLocalizedStrings( 139 void NetworkScreenHandler::GetLocalizedStrings(
139 DictionaryValue* localized_strings) { 140 DictionaryValue* localized_strings) {
140 localized_strings->SetString("networkScreenTitle", 141 localized_strings->SetString("networkScreenTitle",
141 l10n_util::GetStringUTF16(IDS_WELCOME_SCREEN_TITLE)); 142 l10n_util::GetStringUTF16(IDS_WELCOME_SCREEN_TITLE));
142 localized_strings->SetString("selectLanguage", 143 localized_strings->SetString("selectLanguage",
143 l10n_util::GetStringUTF16(IDS_LANGUAGE_SELECTION_SELECT)); 144 l10n_util::GetStringUTF16(IDS_LANGUAGE_SELECTION_SELECT));
144 localized_strings->SetString("selectKeyboard", 145 localized_strings->SetString("selectKeyboard",
145 l10n_util::GetStringUTF16(IDS_KEYBOARD_SELECTION_SELECT)); 146 l10n_util::GetStringUTF16(IDS_KEYBOARD_SELECTION_SELECT));
146 localized_strings->SetString("selectNetwork", 147 localized_strings->SetString("selectNetwork",
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 } 295 }
295 } 296 }
296 297
297 void NetworkScreenHandler::CloseNetworkWindow() { 298 void NetworkScreenHandler::CloseNetworkWindow() {
298 if (network_window_) 299 if (network_window_)
299 network_window_->Close(); 300 network_window_->Close();
300 network_window_ = NULL; 301 network_window_ = NULL;
301 } 302 }
302 303
303 } // namespace chromeos 304 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698