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

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: Uploading synced version 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 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 void PrerenderContents::ShowCreatedFullscreenWidget(int route_id) { 597 void PrerenderContents::ShowCreatedFullscreenWidget(int route_id) {
598 NOTIMPLEMENTED(); 598 NOTIMPLEMENTED();
599 } 599 }
600 600
601 void PrerenderContents::OnRenderViewHostCreated( 601 void PrerenderContents::OnRenderViewHostCreated(
602 RenderViewHost* new_render_view_host) { 602 RenderViewHost* new_render_view_host) {
603 } 603 }
604 604
605 void PrerenderContents::OnDidStartProvisionalLoadForFrame(int64 frame_id, 605 void PrerenderContents::OnDidStartProvisionalLoadForFrame(int64 frame_id,
606 bool is_main_frame, 606 bool is_main_frame,
607 bool has_opener_set,
607 const GURL& url) { 608 const GURL& url) {
608 if (is_main_frame) { 609 if (is_main_frame) {
609 if (!AddAliasURL(url)) 610 if (!AddAliasURL(url))
610 return; 611 return;
611 612
612 // Usually, this event fires if the user clicks or enters a new URL. 613 // Usually, this event fires if the user clicks or enters a new URL.
613 // Neither of these can happen in the case of an invisible prerender. 614 // Neither of these can happen in the case of an invisible prerender.
614 // So the cause is: Some JavaScript caused a new URL to be loaded. In that 615 // So the cause is: Some JavaScript caused a new URL to be loaded. In that
615 // case, the spinner would start again in the browser, so we must reset 616 // case, the spinner would start again in the browser, so we must reset
616 // has_stopped_loading_ so that the spinner won't be stopped. 617 // has_stopped_loading_ so that the spinner won't be stopped.
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 // used. 755 // used.
755 if (UseTabContents()) { 756 if (UseTabContents()) {
756 if (!prerender_contents_.get()) 757 if (!prerender_contents_.get())
757 return NULL; 758 return NULL;
758 return prerender_contents_->render_view_host(); 759 return prerender_contents_->render_view_host();
759 } 760 }
760 return render_view_host_; 761 return render_view_host_;
761 } 762 }
762 763
763 } // namespace prerender 764 } // 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