OLD | NEW |
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/stringprintf.h" | 7 #include "base/stringprintf.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 web_ui_, WebUILoginDisplay::GetLoginWindow()->GetNativeWindow())); | 74 web_ui_, WebUILoginDisplay::GetLoginWindow()->GetNativeWindow())); |
75 | 75 |
76 ShowScreen(kNetworkScreen, NULL); | 76 ShowScreen(kNetworkScreen, NULL); |
77 } | 77 } |
78 | 78 |
79 void NetworkScreenHandler::Hide() { | 79 void NetworkScreenHandler::Hide() { |
80 dropdown_.reset(); | 80 dropdown_.reset(); |
81 } | 81 } |
82 | 82 |
83 void NetworkScreenHandler::ShowError(const string16& message) { | 83 void NetworkScreenHandler::ShowError(const string16& message) { |
84 // scoped_ptr<Value> message_value(Value::CreateStringValue(message)); | 84 scoped_ptr<Value> message_value(Value::CreateStringValue(message)); |
85 // web_ui_->CallJavascriptFunction("cr.ui.Oobe.showError", *message_value); | 85 web_ui_->CallJavascriptFunction("oobe.NetworkScreen.showError", |
| 86 *message_value); |
86 } | 87 } |
87 | 88 |
88 void NetworkScreenHandler::ClearErrors() { | 89 void NetworkScreenHandler::ClearErrors() { |
89 // web_ui_->CallJavascriptFunction("cr.ui.Oobe.clearErrors"); | 90 web_ui_->CallJavascriptFunction("oobe.NetworkScreen.clearErrors"); |
90 } | 91 } |
91 | 92 |
92 void NetworkScreenHandler::ShowConnectingStatus( | 93 void NetworkScreenHandler::ShowConnectingStatus( |
93 bool connecting, | 94 bool connecting, |
94 const string16& network_id) { | 95 const string16& network_id) { |
95 // string16 connecting_label = | 96 // string16 connecting_label = |
96 // l10n_util::GetStringFUTF16(IDS_NETWORK_SELECTION_CONNECTING, | 97 // l10n_util::GetStringFUTF16(IDS_NETWORK_SELECTION_CONNECTING, |
97 // network_id); | 98 // network_id); |
98 // scoped_ptr<Value> connecting_value(Value::CreateBooleanValue(connecting)); | 99 // scoped_ptr<Value> connecting_value(Value::CreateBooleanValue(connecting)); |
99 // scoped_ptr<Value> network_id_value(Value::CreateStringValue(network_id)); | 100 // scoped_ptr<Value> network_id_value(Value::CreateStringValue(network_id)); |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 input_method->SetString("title", | 242 input_method->SetString("title", |
242 WideToUTF16(InputMethodMenu::GetTextForMenu(input_methods->at(i)))); | 243 WideToUTF16(InputMethodMenu::GetTextForMenu(input_methods->at(i)))); |
243 input_method->SetBoolean("selected", | 244 input_method->SetBoolean("selected", |
244 input_methods->at(i).id() == current_input_method_id); | 245 input_methods->at(i).id() == current_input_method_id); |
245 input_methods_list->Append(input_method); | 246 input_methods_list->Append(input_method); |
246 } | 247 } |
247 return input_methods_list; | 248 return input_methods_list; |
248 } | 249 } |
249 | 250 |
250 } // namespace chromeos | 251 } // namespace chromeos |
OLD | NEW |