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 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 |
OLD | NEW |