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

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

Issue 267103002: Ignore title parameter for navigator.registerProtocolHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests Created 6 years, 7 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 // page, so cancel this prerender. 171 // page, so cancel this prerender.
172 prerender_contents_->Destroy(FINAL_STATUS_JAVASCRIPT_ALERT); 172 prerender_contents_->Destroy(FINAL_STATUS_JAVASCRIPT_ALERT);
173 // Always suppress JavaScript messages if they're triggered by a page being 173 // Always suppress JavaScript messages if they're triggered by a page being
174 // prerendered. 174 // prerendered.
175 return true; 175 return true;
176 } 176 }
177 177
178 virtual void RegisterProtocolHandler(WebContents* web_contents, 178 virtual void RegisterProtocolHandler(WebContents* web_contents,
179 const std::string& protocol, 179 const std::string& protocol,
180 const GURL& url, 180 const GURL& url,
181 const base::string16& title,
182 bool user_gesture) OVERRIDE { 181 bool user_gesture) OVERRIDE {
183 // TODO(mmenke): Consider supporting this if it is a common case during 182 // TODO(mmenke): Consider supporting this if it is a common case during
184 // prerenders. 183 // prerenders.
185 prerender_contents_->Destroy(FINAL_STATUS_REGISTER_PROTOCOL_HANDLER); 184 prerender_contents_->Destroy(FINAL_STATUS_REGISTER_PROTOCOL_HANDLER);
186 } 185 }
187 186
188 virtual gfx::Size GetSizeForNewRenderView( 187 virtual gfx::Size GetSizeForNewRenderView(
189 WebContents* web_contents) const OVERRIDE { 188 WebContents* web_contents) const OVERRIDE {
190 // Have to set the size of the RenderView on initialization to be sure it is 189 // Have to set the size of the RenderView on initialization to be sure it is
191 // set before the RenderView is hidden on all platforms (esp. Android). 190 // set before the RenderView is hidden on all platforms (esp. Android).
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 void PrerenderContents::AddResourceThrottle( 878 void PrerenderContents::AddResourceThrottle(
880 const base::WeakPtr<PrerenderResourceThrottle>& throttle) { 879 const base::WeakPtr<PrerenderResourceThrottle>& throttle) {
881 resource_throttles_.push_back(throttle); 880 resource_throttles_.push_back(throttle);
882 } 881 }
883 882
884 void PrerenderContents::AddNetworkBytes(int64 bytes) { 883 void PrerenderContents::AddNetworkBytes(int64 bytes) {
885 network_bytes_ += bytes; 884 network_bytes_ += bytes;
886 } 885 }
887 886
888 } // namespace prerender 887 } // namespace prerender
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698