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

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 merge 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/input_method/input_method_util.h" 14 #include "chrome/browser/chromeos/input_method/input_method_util.h"
15 #include "chrome/browser/chromeos/login/language_switch_menu.h" 15 #include "chrome/browser/chromeos/login/language_switch_menu.h"
16 #include "chrome/browser/chromeos/login/webui_login_display.h" 16 #include "chrome/browser/chromeos/login/webui_login_display.h"
17 #include "chrome/browser/chromeos/status/input_method_menu.h" 17 #include "chrome/browser/chromeos/status/input_method_menu.h"
18 #include "chrome/browser/chromeos/status/network_dropdown_button.h" 18 #include "chrome/browser/chromeos/status/network_dropdown_button.h"
19 #include "chrome/browser/chromeos/wm_ipc.h" 19 #include "chrome/browser/chromeos/wm_ipc.h"
20 #include "chrome/browser/ui/webui/options/chromeos/cros_language_options_handler .h" 20 #include "chrome/browser/ui/webui/options/chromeos/cros_language_options_handler .h"
21 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
21 #include "content/browser/tab_contents/tab_contents.h" 22 #include "content/browser/tab_contents/tab_contents.h"
22 #include "content/browser/webui/web_ui.h" 23 #include "content/browser/webui/web_ui.h"
23 #include "grit/chromium_strings.h" 24 #include "grit/chromium_strings.h"
24 #include "grit/generated_resources.h" 25 #include "grit/generated_resources.h"
25 #include "ui/base/l10n/l10n_util.h" 26 #include "ui/base/l10n/l10n_util.h"
26 #include "ui/gfx/rect.h" 27 #include "ui/gfx/rect.h"
27 #include "views/layout/fill_layout.h" 28 #include "views/layout/fill_layout.h"
28 #include "views/widget/widget.h" 29 #include "views/widget/widget.h"
29 30
30 namespace { 31 namespace {
(...skipping 95 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 } 299 }
299 } 300 }
300 301
301 void NetworkScreenHandler::CloseNetworkWindow() { 302 void NetworkScreenHandler::CloseNetworkWindow() {
302 if (network_window_) 303 if (network_window_)
303 network_window_->Close(); 304 network_window_->Close();
304 network_window_ = NULL; 305 network_window_ = NULL;
305 } 306 }
306 307
307 } // namespace chromeos 308 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/network_screen_handler.h ('k') | chrome/browser/ui/webui/chromeos/login/oobe_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698