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

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

Issue 9861015: [cros] Captive portal dialog fixes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clarify Created 8 years, 9 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
« 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"
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 base::Unretained(this))); 435 base::Unretained(this)));
436 web_ui()->RegisterMessageCallback("launchDemoUser", 436 web_ui()->RegisterMessageCallback("launchDemoUser",
437 base::Bind(&SigninScreenHandler::HandleLaunchDemoUser, 437 base::Bind(&SigninScreenHandler::HandleLaunchDemoUser,
438 base::Unretained(this))); 438 base::Unretained(this)));
439 web_ui()->RegisterMessageCallback("launchIncognito", 439 web_ui()->RegisterMessageCallback("launchIncognito",
440 base::Bind(&SigninScreenHandler::HandleLaunchIncognito, 440 base::Bind(&SigninScreenHandler::HandleLaunchIncognito,
441 base::Unretained(this))); 441 base::Unretained(this)));
442 web_ui()->RegisterMessageCallback("fixCaptivePortal", 442 web_ui()->RegisterMessageCallback("fixCaptivePortal",
443 base::Bind(&SigninScreenHandler::HandleFixCaptivePortal, 443 base::Bind(&SigninScreenHandler::HandleFixCaptivePortal,
444 base::Unretained(this))); 444 base::Unretained(this)));
445 web_ui()->RegisterMessageCallback("showCaptivePortal",
446 base::Bind(&SigninScreenHandler::HandleShowCaptivePortal,
447 base::Unretained(this)));
445 web_ui()->RegisterMessageCallback("hideCaptivePortal", 448 web_ui()->RegisterMessageCallback("hideCaptivePortal",
446 base::Bind(&SigninScreenHandler::HandleHideCaptivePortal, 449 base::Bind(&SigninScreenHandler::HandleHideCaptivePortal,
447 base::Unretained(this))); 450 base::Unretained(this)));
448 web_ui()->RegisterMessageCallback("offlineLogin", 451 web_ui()->RegisterMessageCallback("offlineLogin",
449 base::Bind(&SigninScreenHandler::HandleOfflineLogin, 452 base::Bind(&SigninScreenHandler::HandleOfflineLogin,
450 base::Unretained(this))); 453 base::Unretained(this)));
451 web_ui()->RegisterMessageCallback("showAddUser", 454 web_ui()->RegisterMessageCallback("showAddUser",
452 base::Bind(&SigninScreenHandler::HandleShowAddUser, 455 base::Bind(&SigninScreenHandler::HandleShowAddUser,
453 base::Unretained(this))); 456 base::Unretained(this)));
454 web_ui()->RegisterMessageCallback("shutdownSystem", 457 web_ui()->RegisterMessageCallback("shutdownSystem",
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 // TODO(altimofeev): move error page and captive portal window showing logic 729 // TODO(altimofeev): move error page and captive portal window showing logic
727 // to C++ (currenly most of it is done on the JS side). 730 // to C++ (currenly most of it is done on the JS side).
728 if (!captive_portal_window_proxy_.get()) { 731 if (!captive_portal_window_proxy_.get()) {
729 captive_portal_window_proxy_.reset( 732 captive_portal_window_proxy_.reset(
730 new CaptivePortalWindowProxy(network_state_informer_.get(), 733 new CaptivePortalWindowProxy(network_state_informer_.get(),
731 GetNativeWindow())); 734 GetNativeWindow()));
732 } 735 }
733 captive_portal_window_proxy_->ShowIfRedirected(); 736 captive_portal_window_proxy_->ShowIfRedirected();
734 } 737 }
735 738
739 void SigninScreenHandler::HandleShowCaptivePortal(const base::ListValue* args) {
740 // This call is an explicit user action
741 // i.e. clicking on link so force dialog show.
742 HandleFixCaptivePortal(args);
743 captive_portal_window_proxy_->Show();
744 }
745
736 void SigninScreenHandler::HandleHideCaptivePortal(const base::ListValue* args) { 746 void SigninScreenHandler::HandleHideCaptivePortal(const base::ListValue* args) {
737 if (captive_portal_window_proxy_.get()) 747 if (captive_portal_window_proxy_.get())
738 captive_portal_window_proxy_->Close(); 748 captive_portal_window_proxy_->Close();
739 } 749 }
740 750
741 void SigninScreenHandler::HandleOfflineLogin(const base::ListValue* args) { 751 void SigninScreenHandler::HandleOfflineLogin(const base::ListValue* args) {
742 if (!delegate_ || delegate_->IsShowUsers()) { 752 if (!delegate_ || delegate_->IsShowUsers()) {
743 NOTREACHED(); 753 NOTREACHED();
744 return; 754 return;
745 } 755 }
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
1015 !cookie_remover_ && 1025 !cookie_remover_ &&
1016 !dns_clear_task_running_ && 1026 !dns_clear_task_running_ &&
1017 network_state_informer_->is_online()) { 1027 network_state_informer_->is_online()) {
1018 gaia_silent_load_ = true; 1028 gaia_silent_load_ = true;
1019 gaia_silent_load_network_ = network_state_informer_->active_network_id(); 1029 gaia_silent_load_network_ = network_state_informer_->active_network_id();
1020 LoadAuthExtension(true, true, false); 1030 LoadAuthExtension(true, true, false);
1021 } 1031 }
1022 } 1032 }
1023 1033
1024 } // namespace chromeos 1034 } // 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