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 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
511 *matching_url = *matching_url_iterator; | 511 *matching_url = *matching_url_iterator; |
512 return true; | 512 return true; |
513 } | 513 } |
514 return false; | 514 return false; |
515 } | 515 } |
516 | 516 |
517 void PrerenderContents::OnJSOutOfMemory() { | 517 void PrerenderContents::OnJSOutOfMemory() { |
518 Destroy(FINAL_STATUS_JS_OUT_OF_MEMORY); | 518 Destroy(FINAL_STATUS_JS_OUT_OF_MEMORY); |
519 } | 519 } |
520 | 520 |
521 void PrerenderContents::RenderViewGone() { | 521 void PrerenderContents::RenderViewGone(base::TerminationStatus status) { |
522 Destroy(FINAL_STATUS_RENDERER_CRASHED); | 522 Destroy(FINAL_STATUS_RENDERER_CRASHED); |
523 } | 523 } |
524 | 524 |
525 void PrerenderContents::DidStopLoading() { | 525 void PrerenderContents::DidStopLoading() { |
526 has_stopped_loading_ = true; | 526 has_stopped_loading_ = true; |
527 } | 527 } |
528 | 528 |
529 void PrerenderContents::DidStartProvisionalLoadForFrame( | 529 void PrerenderContents::DidStartProvisionalLoadForFrame( |
530 int64 frame_id, | 530 int64 frame_id, |
531 bool is_main_frame, | 531 bool is_main_frame, |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
662 bool PrerenderContents::IsCrossSiteNavigationPending() const { | 662 bool PrerenderContents::IsCrossSiteNavigationPending() const { |
663 if (!prerender_contents_.get() || !prerender_contents_->tab_contents()) | 663 if (!prerender_contents_.get() || !prerender_contents_->tab_contents()) |
664 return false; | 664 return false; |
665 const TabContents* tab_contents = prerender_contents_->tab_contents(); | 665 const TabContents* tab_contents = prerender_contents_->tab_contents(); |
666 return (tab_contents->GetSiteInstance() != | 666 return (tab_contents->GetSiteInstance() != |
667 tab_contents->GetPendingSiteInstance()); | 667 tab_contents->GetPendingSiteInstance()); |
668 } | 668 } |
669 | 669 |
670 | 670 |
671 } // namespace prerender | 671 } // namespace prerender |
OLD | NEW |