Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(234)

Side by Side Diff: chrome/browser/prerender/prerender_contents.cc

Issue 10978016: Remove two functions on WebContentsDelegate which didn't belong in content. They were only called f… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: don't log history for prerender on android Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <functional> 8 #include <functional>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 // that requires the browser to perform the transition instead of WebKit. 97 // that requires the browser to perform the transition instead of WebKit.
98 // Examples include prerendering a site that redirects to an app URL, 98 // Examples include prerendering a site that redirects to an app URL,
99 // or if --enable-strict-site-isolation is specified and the prerendered 99 // or if --enable-strict-site-isolation is specified and the prerendered
100 // frame redirects to a different origin. 100 // frame redirects to a different origin.
101 // TODO(cbentzel): Consider supporting this if it is a common case during 101 // TODO(cbentzel): Consider supporting this if it is a common case during
102 // prerenders. 102 // prerenders.
103 prerender_contents_->Destroy(FINAL_STATUS_OPEN_URL); 103 prerender_contents_->Destroy(FINAL_STATUS_OPEN_URL);
104 return NULL; 104 return NULL;
105 } 105 }
106 106
107 virtual bool ShouldAddNavigationToHistory(
108 const history::HistoryAddPageArgs& add_page_args,
109 content::NavigationType navigation_type) OVERRIDE {
110 add_page_vector_.push_back(add_page_args);
sky 2012/09/25 15:38:48 Don't we need this to add to add_page_vector_?
111 return false;
112 }
113
114 virtual bool CanDownload(RenderViewHost* render_view_host, 107 virtual bool CanDownload(RenderViewHost* render_view_host,
115 int request_id, 108 int request_id,
116 const std::string& request_method) OVERRIDE { 109 const std::string& request_method) OVERRIDE {
117 prerender_contents_->Destroy(FINAL_STATUS_DOWNLOAD); 110 prerender_contents_->Destroy(FINAL_STATUS_DOWNLOAD);
118 // Cancel the download. 111 // Cancel the download.
119 return false; 112 return false;
120 } 113 }
121 114
122 virtual void OnStartDownload(WebContents* source, 115 virtual void OnStartDownload(WebContents* source,
123 DownloadItem* download) OVERRIDE { 116 DownloadItem* download) OVERRIDE {
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 bool PrerenderContents::IsCrossSiteNavigationPending() const { 709 bool PrerenderContents::IsCrossSiteNavigationPending() const {
717 if (!prerender_contents_.get() || !prerender_contents_->web_contents()) 710 if (!prerender_contents_.get() || !prerender_contents_->web_contents())
718 return false; 711 return false;
719 const WebContents* web_contents = prerender_contents_->web_contents(); 712 const WebContents* web_contents = prerender_contents_->web_contents();
720 return (web_contents->GetSiteInstance() != 713 return (web_contents->GetSiteInstance() !=
721 web_contents->GetPendingSiteInstance()); 714 web_contents->GetPendingSiteInstance());
722 } 715 }
723 716
724 717
725 } // namespace prerender 718 } // namespace prerender
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698