| 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 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 625 for (std::vector<FaviconURL>::const_iterator it = urls.begin(); | 625 for (std::vector<FaviconURL>::const_iterator it = urls.begin(); |
| 626 it != urls.end(); ++it) { | 626 it != urls.end(); ++it) { |
| 627 if (it->icon_type == FaviconURL::FAVICON) { | 627 if (it->icon_type == FaviconURL::FAVICON) { |
| 628 icon_url_ = it->icon_url; | 628 icon_url_ = it->icon_url; |
| 629 VLOG(1) << icon_url_; | 629 VLOG(1) << icon_url_; |
| 630 return; | 630 return; |
| 631 } | 631 } |
| 632 } | 632 } |
| 633 } | 633 } |
| 634 | 634 |
| 635 void PrerenderContents::OnMaybeCancelPrerenderForHTML5Media() { | |
| 636 Destroy(FINAL_STATUS_HTML5_MEDIA); | |
| 637 } | |
| 638 | |
| 639 bool PrerenderContents::AddAliasURL(const GURL& url) { | 635 bool PrerenderContents::AddAliasURL(const GURL& url) { |
| 640 if (!url.SchemeIs("http")) { | 636 if (!url.SchemeIs("http")) { |
| 641 if (url.SchemeIs("https")) | 637 if (url.SchemeIs("https")) |
| 642 Destroy(FINAL_STATUS_HTTPS); | 638 Destroy(FINAL_STATUS_HTTPS); |
| 643 else | 639 else |
| 644 Destroy(FINAL_STATUS_UNSUPPORTED_SCHEME); | 640 Destroy(FINAL_STATUS_UNSUPPORTED_SCHEME); |
| 645 return false; | 641 return false; |
| 646 } | 642 } |
| 647 alias_urls_.push_back(url); | 643 alias_urls_.push_back(url); |
| 648 return true; | 644 return true; |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 760 // used. | 756 // used. |
| 761 if (UseTabContents()) { | 757 if (UseTabContents()) { |
| 762 if (!prerender_contents_.get()) | 758 if (!prerender_contents_.get()) |
| 763 return NULL; | 759 return NULL; |
| 764 return prerender_contents_->render_view_host(); | 760 return prerender_contents_->render_view_host(); |
| 765 } | 761 } |
| 766 return render_view_host_; | 762 return render_view_host_; |
| 767 } | 763 } |
| 768 | 764 |
| 769 } // namespace prerender | 765 } // namespace prerender |
| OLD | NEW |