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

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

Issue 10166004: Added a message that suggest to configure a proxy for a network. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed suggestion. Created 8 years, 8 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
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/signin_screen_handler.h" 5 #include "chrome/browser/ui/webui/chromeos/login/signin_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/callback.h" 9 #include "base/callback.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/hash_tables.h" 11 #include "base/hash_tables.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/utf_string_conversions.h" 13 #include "base/utf_string_conversions.h"
14 #include "base/values.h" 14 #include "base/values.h"
15 #include "chrome/browser/browser_process.h" 15 #include "chrome/browser/browser_process.h"
16 #include "chrome/browser/browser_shutdown.h" 16 #include "chrome/browser/browser_shutdown.h"
17 #include "chrome/browser/chromeos/cros/cros_library.h" 17 #include "chrome/browser/chromeos/cros/cros_library.h"
18 #include "chrome/browser/chromeos/cros/network_library.h" 18 #include "chrome/browser/chromeos/cros/network_library.h"
19 #include "chrome/browser/chromeos/cros_settings.h" 19 #include "chrome/browser/chromeos/cros_settings.h"
20 #include "chrome/browser/chromeos/input_method/input_method_manager.h" 20 #include "chrome/browser/chromeos/input_method/input_method_manager.h"
21 #include "chrome/browser/chromeos/input_method/xkeyboard.h" 21 #include "chrome/browser/chromeos/input_method/xkeyboard.h"
22 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" 22 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h"
23 #include "chrome/browser/chromeos/login/authenticator.h" 23 #include "chrome/browser/chromeos/login/authenticator.h"
24 #include "chrome/browser/chromeos/login/captive_portal_window_proxy.h" 24 #include "chrome/browser/chromeos/login/captive_portal_window_proxy.h"
25 #include "chrome/browser/chromeos/login/proxy_settings_dialog.h"
25 #include "chrome/browser/chromeos/login/screen_locker.h" 26 #include "chrome/browser/chromeos/login/screen_locker.h"
26 #include "chrome/browser/chromeos/login/user.h" 27 #include "chrome/browser/chromeos/login/user.h"
27 #include "chrome/browser/chromeos/login/webui_login_display.h" 28 #include "chrome/browser/chromeos/login/webui_login_display.h"
28 #include "chrome/browser/io_thread.h" 29 #include "chrome/browser/io_thread.h"
29 #include "chrome/browser/profiles/profile.h" 30 #include "chrome/browser/profiles/profile.h"
30 #include "chrome/common/chrome_notification_types.h" 31 #include "chrome/common/chrome_notification_types.h"
31 #include "chrome/common/chrome_switches.h" 32 #include "chrome/common/chrome_switches.h"
32 #include "chrome/common/net/gaia/gaia_urls.h" 33 #include "chrome/common/net/gaia/gaia_urls.h"
33 #include "chrome/common/url_constants.h" 34 #include "chrome/common/url_constants.h"
34 #include "chromeos/dbus/dbus_thread_manager.h" 35 #include "chromeos/dbus/dbus_thread_manager.h"
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 localized_strings->SetString("addUserErrorMessage", 325 localized_strings->SetString("addUserErrorMessage",
325 l10n_util::GetStringUTF16(IDS_LOGIN_ERROR_ADD_USER_OFFLINE)); 326 l10n_util::GetStringUTF16(IDS_LOGIN_ERROR_ADD_USER_OFFLINE));
326 localized_strings->SetString("offlineMessageTitle", 327 localized_strings->SetString("offlineMessageTitle",
327 l10n_util::GetStringUTF16(IDS_LOGIN_OFFLINE_TITLE)); 328 l10n_util::GetStringUTF16(IDS_LOGIN_OFFLINE_TITLE));
328 localized_strings->SetString("offlineMessageBody", 329 localized_strings->SetString("offlineMessageBody",
329 l10n_util::GetStringUTF16(IDS_LOGIN_OFFLINE_MESSAGE)); 330 l10n_util::GetStringUTF16(IDS_LOGIN_OFFLINE_MESSAGE));
330 localized_strings->SetString("captivePortalTitle", 331 localized_strings->SetString("captivePortalTitle",
331 l10n_util::GetStringUTF16(IDS_LOGIN_MAYBE_CAPTIVE_PORTAL_TITLE)); 332 l10n_util::GetStringUTF16(IDS_LOGIN_MAYBE_CAPTIVE_PORTAL_TITLE));
332 localized_strings->SetString("captivePortalMessage", 333 localized_strings->SetString("captivePortalMessage",
333 l10n_util::GetStringUTF16(IDS_LOGIN_MAYBE_CAPTIVE_PORTAL)); 334 l10n_util::GetStringUTF16(IDS_LOGIN_MAYBE_CAPTIVE_PORTAL));
335 localized_strings->SetString("captivePortalProxyMessage",
336 l10n_util::GetStringUTF16(IDS_LOGIN_MAYBE_CAPTIVE_PORTAL_PROXY));
334 localized_strings->SetString("captivePortalNetworkSelect", 337 localized_strings->SetString("captivePortalNetworkSelect",
335 l10n_util::GetStringUTF16(IDS_LOGIN_MAYBE_CAPTIVE_PORTAL_NETWORK_SELECT)); 338 l10n_util::GetStringUTF16(IDS_LOGIN_MAYBE_CAPTIVE_PORTAL_NETWORK_SELECT));
336 localized_strings->SetString("proxyMessageText", 339 localized_strings->SetString("proxyMessageText",
337 l10n_util::GetStringUTF16(IDS_LOGIN_PROXY_ERROR_MESSAGE)); 340 l10n_util::GetStringUTF16(IDS_LOGIN_PROXY_ERROR_MESSAGE));
338 localized_strings->SetString("createAccount", 341 localized_strings->SetString("createAccount",
339 l10n_util::GetStringUTF16(IDS_CREATE_ACCOUNT_HTML)); 342 l10n_util::GetStringUTF16(IDS_CREATE_ACCOUNT_HTML));
340 localized_strings->SetString("guestSignin", 343 localized_strings->SetString("guestSignin",
341 l10n_util::GetStringUTF16(IDS_BROWSE_WITHOUT_SIGNING_IN_HTML)); 344 l10n_util::GetStringUTF16(IDS_BROWSE_WITHOUT_SIGNING_IN_HTML));
342 localized_strings->SetString("offlineLogin", 345 localized_strings->SetString("offlineLogin",
343 l10n_util::GetStringUTF16(IDS_OFFLINE_LOGIN_HTML)); 346 l10n_util::GetStringUTF16(IDS_OFFLINE_LOGIN_HTML));
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 base::Unretained(this))); 472 base::Unretained(this)));
470 web_ui()->RegisterMessageCallback("signOutUser", 473 web_ui()->RegisterMessageCallback("signOutUser",
471 base::Bind(&SigninScreenHandler::HandleSignOutUser, 474 base::Bind(&SigninScreenHandler::HandleSignOutUser,
472 base::Unretained(this))); 475 base::Unretained(this)));
473 web_ui()->RegisterMessageCallback("userImagesLoaded", 476 web_ui()->RegisterMessageCallback("userImagesLoaded",
474 base::Bind(&SigninScreenHandler::HandleUserImagesLoaded, 477 base::Bind(&SigninScreenHandler::HandleUserImagesLoaded,
475 base::Unretained(this))); 478 base::Unretained(this)));
476 web_ui()->RegisterMessageCallback("networkErrorShown", 479 web_ui()->RegisterMessageCallback("networkErrorShown",
477 base::Bind(&SigninScreenHandler::HandleNetworkErrorShown, 480 base::Bind(&SigninScreenHandler::HandleNetworkErrorShown,
478 base::Unretained(this))); 481 base::Unretained(this)));
482 web_ui()->RegisterMessageCallback("openProxySettings",
483 base::Bind(&SigninScreenHandler::HandleOpenProxySettings,
484 base::Unretained(this)));
479 } 485 }
480 486
481 void SigninScreenHandler::HandleGetUsers(const base::ListValue* args) { 487 void SigninScreenHandler::HandleGetUsers(const base::ListValue* args) {
482 SendUserList(false); 488 SendUserList(false);
483 } 489 }
484 490
485 void SigninScreenHandler::ClearAndEnablePassword() { 491 void SigninScreenHandler::ClearAndEnablePassword() {
486 base::FundamentalValue force_online(false); 492 base::FundamentalValue force_online(false);
487 web_ui()->CallJavascriptFunction("cr.ui.Oobe.resetSigninUI", force_online); 493 web_ui()->CallJavascriptFunction("cr.ui.Oobe.resetSigninUI", force_online);
488 } 494 }
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
963 content::NotificationService::AllSources(), 969 content::NotificationService::AllSources(),
964 content::NotificationService::NoDetails()); 970 content::NotificationService::NoDetails());
965 } 971 }
966 972
967 void SigninScreenHandler::HandleCreateAccount(const base::ListValue* args) { 973 void SigninScreenHandler::HandleCreateAccount(const base::ListValue* args) {
968 if (!delegate_) 974 if (!delegate_)
969 return; 975 return;
970 delegate_->CreateAccount(); 976 delegate_->CreateAccount();
971 } 977 }
972 978
979 void SigninScreenHandler::HandleOpenProxySettings(const base::ListValue* args) {
980 ProxySettingsDialog* dialog =
Nikita (slow) 2012/04/20 15:09:16 #include "chrome/browser/chromeos/login/base_login
981 new ProxySettingsDialog(NULL, GetNativeWindow());
982 dialog->Show();
983 }
984
973 void SigninScreenHandler::StartClearingDnsCache() { 985 void SigninScreenHandler::StartClearingDnsCache() {
974 if (dns_clear_task_running_ || !g_browser_process->io_thread()) 986 if (dns_clear_task_running_ || !g_browser_process->io_thread())
975 return; 987 return;
976 988
977 dns_cleared_ = false; 989 dns_cleared_ = false;
978 BrowserThread::PostTaskAndReply( 990 BrowserThread::PostTaskAndReply(
979 BrowserThread::IO, FROM_HERE, 991 BrowserThread::IO, FROM_HERE,
980 base::Bind(&ClearDnsCache, g_browser_process->io_thread()), 992 base::Bind(&ClearDnsCache, g_browser_process->io_thread()),
981 base::Bind(&SigninScreenHandler::OnDnsCleared, 993 base::Bind(&SigninScreenHandler::OnDnsCleared,
982 weak_factory_.GetWeakPtr())); 994 weak_factory_.GetWeakPtr()));
(...skipping 26 matching lines...) Expand all
1009 !dns_clear_task_running_ && 1021 !dns_clear_task_running_ &&
1010 network_state_informer_->is_online()) { 1022 network_state_informer_->is_online()) {
1011 gaia_silent_load_ = true; 1023 gaia_silent_load_ = true;
1012 gaia_silent_load_network_ = 1024 gaia_silent_load_network_ =
1013 network_state_informer_->active_network_service_path(); 1025 network_state_informer_->active_network_service_path();
1014 LoadAuthExtension(true, true, false); 1026 LoadAuthExtension(true, true, false);
1015 } 1027 }
1016 } 1028 }
1017 1029
1018 } // namespace chromeos 1030 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698