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

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: Remove all title references 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 // page, so cancel this prerender. 168 // page, so cancel this prerender.
169 prerender_contents_->Destroy(FINAL_STATUS_JAVASCRIPT_ALERT); 169 prerender_contents_->Destroy(FINAL_STATUS_JAVASCRIPT_ALERT);
170 // Always suppress JavaScript messages if they're triggered by a page being 170 // Always suppress JavaScript messages if they're triggered by a page being
171 // prerendered. 171 // prerendered.
172 return true; 172 return true;
173 } 173 }
174 174
175 virtual void RegisterProtocolHandler(WebContents* web_contents, 175 virtual void RegisterProtocolHandler(WebContents* web_contents,
176 const std::string& protocol, 176 const std::string& protocol,
177 const GURL& url, 177 const GURL& url,
178 const base::string16& title,
179 bool user_gesture) OVERRIDE { 178 bool user_gesture) OVERRIDE {
180 // TODO(mmenke): Consider supporting this if it is a common case during 179 // TODO(mmenke): Consider supporting this if it is a common case during
181 // prerenders. 180 // prerenders.
182 prerender_contents_->Destroy(FINAL_STATUS_REGISTER_PROTOCOL_HANDLER); 181 prerender_contents_->Destroy(FINAL_STATUS_REGISTER_PROTOCOL_HANDLER);
183 } 182 }
184 183
185 virtual gfx::Size GetSizeForNewRenderView( 184 virtual gfx::Size GetSizeForNewRenderView(
186 const WebContents* web_contents) const OVERRIDE { 185 const WebContents* web_contents) const OVERRIDE {
187 // Have to set the size of the RenderView on initialization to be sure it is 186 // Have to set the size of the RenderView on initialization to be sure it is
188 // set before the RenderView is hidden on all platforms (esp. Android). 187 // set before the RenderView is hidden on all platforms (esp. Android).
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after
876 void PrerenderContents::AddResourceThrottle( 875 void PrerenderContents::AddResourceThrottle(
877 const base::WeakPtr<PrerenderResourceThrottle>& throttle) { 876 const base::WeakPtr<PrerenderResourceThrottle>& throttle) {
878 resource_throttles_.push_back(throttle); 877 resource_throttles_.push_back(throttle);
879 } 878 }
880 879
881 void PrerenderContents::AddNetworkBytes(int64 bytes) { 880 void PrerenderContents::AddNetworkBytes(int64 bytes) {
882 network_bytes_ += bytes; 881 network_bytes_ += bytes;
883 } 882 }
884 883
885 } // namespace prerender 884 } // namespace prerender
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698