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

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

Powered by Google App Engine
This is Rietveld 408576698