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/prerender/prerender_contents.h" | 5 #include "chrome/browser/prerender/prerender_contents.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <functional> | 8 #include <functional> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 has_stopped_loading_ = true; | 551 has_stopped_loading_ = true; |
552 NotifyPrerenderStopLoading(); | 552 NotifyPrerenderStopLoading(); |
553 } | 553 } |
554 | 554 |
555 void PrerenderContents::DidStartProvisionalLoadForFrame( | 555 void PrerenderContents::DidStartProvisionalLoadForFrame( |
556 int64 frame_id, | 556 int64 frame_id, |
557 int64 parent_frame_id, | 557 int64 parent_frame_id, |
558 bool is_main_frame, | 558 bool is_main_frame, |
559 const GURL& validated_url, | 559 const GURL& validated_url, |
560 bool is_error_page, | 560 bool is_error_page, |
| 561 bool is_iframe_srcdoc, |
561 RenderViewHost* render_view_host) { | 562 RenderViewHost* render_view_host) { |
562 if (is_main_frame) { | 563 if (is_main_frame) { |
563 if (!AddAliasURL(validated_url)) | 564 if (!AddAliasURL(validated_url)) |
564 return; | 565 return; |
565 | 566 |
566 // Usually, this event fires if the user clicks or enters a new URL. | 567 // Usually, this event fires if the user clicks or enters a new URL. |
567 // Neither of these can happen in the case of an invisible prerender. | 568 // Neither of these can happen in the case of an invisible prerender. |
568 // So the cause is: Some JavaScript caused a new URL to be loaded. In that | 569 // So the cause is: Some JavaScript caused a new URL to be loaded. In that |
569 // case, the spinner would start again in the browser, so we must reset | 570 // case, the spinner would start again in the browser, so we must reset |
570 // has_stopped_loading_ so that the spinner won't be stopped. | 571 // has_stopped_loading_ so that the spinner won't be stopped. |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
695 | 696 |
696 bool PrerenderContents::IsCrossSiteNavigationPending() const { | 697 bool PrerenderContents::IsCrossSiteNavigationPending() const { |
697 if (!prerender_contents_) | 698 if (!prerender_contents_) |
698 return false; | 699 return false; |
699 return (prerender_contents_->GetSiteInstance() != | 700 return (prerender_contents_->GetSiteInstance() != |
700 prerender_contents_->GetPendingSiteInstance()); | 701 prerender_contents_->GetPendingSiteInstance()); |
701 } | 702 } |
702 | 703 |
703 | 704 |
704 } // namespace prerender | 705 } // namespace prerender |
OLD | NEW |