OLD | NEW |
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/captive_portal/captive_portal_tab_helper.h" | 5 #include "chrome/browser/captive_portal/captive_portal_tab_helper.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "chrome/browser/captive_portal/captive_portal_login_detector.h" | 8 #include "chrome/browser/captive_portal/captive_portal_login_detector.h" |
9 #include "chrome/browser/captive_portal/captive_portal_tab_reloader.h" | 9 #include "chrome/browser/captive_portal/captive_portal_tab_reloader.h" |
10 #include "chrome/browser/captive_portal/captive_portal_service_factory.h" | 10 #include "chrome/browser/captive_portal/captive_portal_service_factory.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 | 58 |
59 CaptivePortalTabHelper::~CaptivePortalTabHelper() { | 59 CaptivePortalTabHelper::~CaptivePortalTabHelper() { |
60 } | 60 } |
61 | 61 |
62 void CaptivePortalTabHelper::DidStartProvisionalLoadForFrame( | 62 void CaptivePortalTabHelper::DidStartProvisionalLoadForFrame( |
63 int64 frame_id, | 63 int64 frame_id, |
64 int64 parent_frame_id, | 64 int64 parent_frame_id, |
65 bool is_main_frame, | 65 bool is_main_frame, |
66 const GURL& validated_url, | 66 const GURL& validated_url, |
67 bool is_error_page, | 67 bool is_error_page, |
| 68 bool is_iframe_srcdoc, |
68 content::RenderViewHost* render_view_host) { | 69 content::RenderViewHost* render_view_host) { |
69 DCHECK(CalledOnValidThread()); | 70 DCHECK(CalledOnValidThread()); |
70 | 71 |
71 // Ignore subframes. | 72 // Ignore subframes. |
72 if (!is_main_frame) | 73 if (!is_main_frame) |
73 return; | 74 return; |
74 | 75 |
75 if (provisional_render_view_host_) { | 76 if (provisional_render_view_host_) { |
76 // If loading an error page for a previous failure, treat this as part of | 77 // If loading an error page for a previous failure, treat this as part of |
77 // the previous load. Link Doctor pages act like two error page loads in a | 78 // the previous load. Link Doctor pages act like two error page loads in a |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 content::WebContents* web_contents = chrome::AddSelectedTabWithURL( | 263 content::WebContents* web_contents = chrome::AddSelectedTabWithURL( |
263 browser, | 264 browser, |
264 CaptivePortalServiceFactory::GetForProfile(profile_)->test_url(), | 265 CaptivePortalServiceFactory::GetForProfile(profile_)->test_url(), |
265 content::PAGE_TRANSITION_TYPED); | 266 content::PAGE_TRANSITION_TYPED); |
266 captive_portal::CaptivePortalTabHelper* captive_portal_tab_helper = | 267 captive_portal::CaptivePortalTabHelper* captive_portal_tab_helper = |
267 captive_portal::CaptivePortalTabHelper::FromWebContents(web_contents); | 268 captive_portal::CaptivePortalTabHelper::FromWebContents(web_contents); |
268 captive_portal_tab_helper->SetIsLoginTab(); | 269 captive_portal_tab_helper->SetIsLoginTab(); |
269 } | 270 } |
270 | 271 |
271 } // namespace captive_portal | 272 } // namespace captive_portal |
OLD | NEW |