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 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 const gfx::Rect& initial_pos) { | 581 const gfx::Rect& initial_pos) { |
582 NOTIMPLEMENTED(); | 582 NOTIMPLEMENTED(); |
583 } | 583 } |
584 | 584 |
585 void PrerenderContents::ShowCreatedFullscreenWidget(int route_id) { | 585 void PrerenderContents::ShowCreatedFullscreenWidget(int route_id) { |
586 NOTIMPLEMENTED(); | 586 NOTIMPLEMENTED(); |
587 } | 587 } |
588 | 588 |
589 void PrerenderContents::OnDidStartProvisionalLoadForFrame(int64 frame_id, | 589 void PrerenderContents::OnDidStartProvisionalLoadForFrame(int64 frame_id, |
590 bool is_main_frame, | 590 bool is_main_frame, |
| 591 bool has_opener_set, |
591 const GURL& url) { | 592 const GURL& url) { |
592 if (is_main_frame) { | 593 if (is_main_frame) { |
593 if (!AddAliasURL(url)) | 594 if (!AddAliasURL(url)) |
594 return; | 595 return; |
595 | 596 |
596 // Usually, this event fires if the user clicks or enters a new URL. | 597 // Usually, this event fires if the user clicks or enters a new URL. |
597 // Neither of these can happen in the case of an invisible prerender. | 598 // Neither of these can happen in the case of an invisible prerender. |
598 // So the cause is: Some JavaScript caused a new URL to be loaded. In that | 599 // So the cause is: Some JavaScript caused a new URL to be loaded. In that |
599 // case, the spinner would start again in the browser, so we must reset | 600 // case, the spinner would start again in the browser, so we must reset |
600 // has_stopped_loading_ so that the spinner won't be stopped. | 601 // has_stopped_loading_ so that the spinner won't be stopped. |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
744 // used. | 745 // used. |
745 if (UseTabContents()) { | 746 if (UseTabContents()) { |
746 if (!prerender_contents_.get()) | 747 if (!prerender_contents_.get()) |
747 return NULL; | 748 return NULL; |
748 return prerender_contents_->render_view_host(); | 749 return prerender_contents_->render_view_host(); |
749 } | 750 } |
750 return render_view_host_; | 751 return render_view_host_; |
751 } | 752 } |
752 | 753 |
753 } // namespace prerender | 754 } // namespace prerender |
OLD | NEW |