OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |