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

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

Issue 10536003: [cros] Add comments for login WebUI related notifications. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rename in header Created 8 years, 6 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) 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 924 matching lines...) Expand 10 before | Expand all | Expand 10 after
935 // Do this only once. Any subsequent call would relod GAIA frame. 935 // Do this only once. Any subsequent call would relod GAIA frame.
936 focus_stolen_ = false; 936 focus_stolen_ = false;
937 const char code[] = "gWindowOnLoad();"; 937 const char code[] = "gWindowOnLoad();";
938 RenderViewHost* rvh = web_ui()->GetWebContents()->GetRenderViewHost(); 938 RenderViewHost* rvh = web_ui()->GetWebContents()->GetRenderViewHost();
939 rvh->ExecuteJavascriptInWebFrame( 939 rvh->ExecuteJavascriptInWebFrame(
940 ASCIIToUTF16("//iframe[@id='signin-frame']\n//iframe"), 940 ASCIIToUTF16("//iframe[@id='signin-frame']\n//iframe"),
941 ASCIIToUTF16(code)); 941 ASCIIToUTF16(code));
942 } 942 }
943 if (!gaia_silent_load_) { 943 if (!gaia_silent_load_) {
944 content::NotificationService::current()->Notify( 944 content::NotificationService::current()->Notify(
945 chrome::NOTIFICATION_LOGIN_WEBUI_READY, 945 chrome::NOTIFICATION_LOGIN_WEBUI_LOADED,
946 content::NotificationService::AllSources(), 946 content::NotificationService::AllSources(),
947 content::NotificationService::NoDetails()); 947 content::NotificationService::NoDetails());
948 } else { 948 } else {
949 focus_stolen_ = true; 949 focus_stolen_ = true;
950 // Prevent focus stealing by the Gaia page. 950 // Prevent focus stealing by the Gaia page.
951 // TODO(altimofeev): temporary solution, until focus parameters are 951 // TODO(altimofeev): temporary solution, until focus parameters are
952 // implemented on the Gaia side. 952 // implemented on the Gaia side.
953 const char code[] = "var gWindowOnLoad = window.onload; " 953 const char code[] = "var gWindowOnLoad = window.onload; "
954 "window.onload=function() {};"; 954 "window.onload=function() {};";
955 RenderViewHost* rvh = web_ui()->GetWebContents()->GetRenderViewHost(); 955 RenderViewHost* rvh = web_ui()->GetWebContents()->GetRenderViewHost();
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
1067 !dns_clear_task_running_ && 1067 !dns_clear_task_running_ &&
1068 network_state_informer_->is_online()) { 1068 network_state_informer_->is_online()) {
1069 gaia_silent_load_ = true; 1069 gaia_silent_load_ = true;
1070 gaia_silent_load_network_ = 1070 gaia_silent_load_network_ =
1071 network_state_informer_->active_network_service_path(); 1071 network_state_informer_->active_network_service_path();
1072 LoadAuthExtension(true, true, false); 1072 LoadAuthExtension(true, true, false);
1073 } 1073 }
1074 } 1074 }
1075 1075
1076 } // namespace chromeos 1076 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/automation/automation_provider_observers_chromeos.cc ('k') | chrome/common/chrome_notification_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698