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

Side by Side Diff: chrome/browser/prerender/prerender_contents.cc

Issue 6915019: Changes to not use the prerendered contents when window.opener needs to be set. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Synced for Commit. Created 9 years, 7 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <utility> 8 #include <utility>
9 9
10 #include "base/process_util.h" 10 #include "base/process_util.h"
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 void PrerenderContents::ShowCreatedFullscreenWidget(int route_id) { 624 void PrerenderContents::ShowCreatedFullscreenWidget(int route_id) {
625 NOTIMPLEMENTED(); 625 NOTIMPLEMENTED();
626 } 626 }
627 627
628 void PrerenderContents::OnRenderViewHostCreated( 628 void PrerenderContents::OnRenderViewHostCreated(
629 RenderViewHost* new_render_view_host) { 629 RenderViewHost* new_render_view_host) {
630 } 630 }
631 631
632 void PrerenderContents::OnDidStartProvisionalLoadForFrame(int64 frame_id, 632 void PrerenderContents::OnDidStartProvisionalLoadForFrame(int64 frame_id,
633 bool is_main_frame, 633 bool is_main_frame,
634 bool has_opener_set,
634 const GURL& url) { 635 const GURL& url) {
635 if (is_main_frame) { 636 if (is_main_frame) {
636 if (!AddAliasURL(url)) 637 if (!AddAliasURL(url))
637 return; 638 return;
638 639
639 // Usually, this event fires if the user clicks or enters a new URL. 640 // Usually, this event fires if the user clicks or enters a new URL.
640 // Neither of these can happen in the case of an invisible prerender. 641 // Neither of these can happen in the case of an invisible prerender.
641 // So the cause is: Some JavaScript caused a new URL to be loaded. In that 642 // So the cause is: Some JavaScript caused a new URL to be loaded. In that
642 // case, the spinner would start again in the browser, so we must reset 643 // case, the spinner would start again in the browser, so we must reset
643 // has_stopped_loading_ so that the spinner won't be stopped. 644 // has_stopped_loading_ so that the spinner won't be stopped.
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 } 822 }
822 return render_view_host_; 823 return render_view_host_;
823 } 824 }
824 825
825 void PrerenderContents::CommitHistory(TabContents* tc) { 826 void PrerenderContents::CommitHistory(TabContents* tc) {
826 if (tab_contents_delegate_.get()) 827 if (tab_contents_delegate_.get())
827 tab_contents_delegate_->CommitHistory(tc); 828 tab_contents_delegate_->CommitHistory(tc);
828 } 829 }
829 830
830 } // namespace prerender 831 } // namespace prerender
OLDNEW
« no previous file with comments | « chrome/browser/prerender/prerender_contents.h ('k') | chrome/browser/prerender/prerender_final_status.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698