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

Side by Side Diff: extensions/shell/renderer/shell_content_renderer_client.cc

Issue 2459143002: Avoid GURL allocations/copies/frees in RenderFrameImpl::willSendRequest (Closed)
Patch Set: s/host/host_piece Created 4 years, 1 month 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
« no previous file with comments | « extensions/shell/renderer/shell_content_renderer_client.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/shell/renderer/shell_content_renderer_client.h" 5 #include "extensions/shell/renderer/shell_content_renderer_client.h"
6 6
7 #include "content/public/common/content_constants.h" 7 #include "content/public/common/content_constants.h"
8 #include "content/public/renderer/render_frame.h" 8 #include "content/public/renderer/render_frame.h"
9 #include "content/public/renderer/render_frame_observer.h" 9 #include "content/public/renderer/render_frame_observer.h"
10 #include "content/public/renderer/render_frame_observer_tracker.h" 10 #include "content/public/renderer/render_frame_observer_tracker.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 blink::WebPlugin* ShellContentRendererClient::CreatePluginReplacement( 90 blink::WebPlugin* ShellContentRendererClient::CreatePluginReplacement(
91 content::RenderFrame* render_frame, 91 content::RenderFrame* render_frame,
92 const base::FilePath& plugin_path) { 92 const base::FilePath& plugin_path) {
93 // Don't provide a custom "failed to load" plugin. 93 // Don't provide a custom "failed to load" plugin.
94 return NULL; 94 return NULL;
95 } 95 }
96 96
97 bool ShellContentRendererClient::WillSendRequest( 97 bool ShellContentRendererClient::WillSendRequest(
98 blink::WebFrame* frame, 98 blink::WebFrame* frame,
99 ui::PageTransition transition_type, 99 ui::PageTransition transition_type,
100 const GURL& url, 100 const blink::WebURL& url,
101 const GURL& first_party_for_cookies,
102 GURL* new_url) { 101 GURL* new_url) {
103 // TODO(jamescook): Cause an error for bad extension scheme requests? 102 // TODO(jamescook): Cause an error for bad extension scheme requests?
104 return false; 103 return false;
105 } 104 }
106 105
107 bool ShellContentRendererClient::IsExternalPepperPlugin( 106 bool ShellContentRendererClient::IsExternalPepperPlugin(
108 const std::string& module_name) { 107 const std::string& module_name) {
109 #if !defined(DISABLE_NACL) 108 #if !defined(DISABLE_NACL)
110 // TODO(bbudge) remove this when the trusted NaCl plugin has been removed. 109 // TODO(bbudge) remove this when the trusted NaCl plugin has been removed.
111 // We must defer certain plugin events for NaCl instances since we switch 110 // We must defer certain plugin events for NaCl instances since we switch
(...skipping 29 matching lines...) Expand all
141 void ShellContentRendererClient::RunScriptsAtDocumentEnd( 140 void ShellContentRendererClient::RunScriptsAtDocumentEnd(
142 content::RenderFrame* render_frame) { 141 content::RenderFrame* render_frame) {
143 extension_dispatcher_->RunScriptsAtDocumentEnd(render_frame); 142 extension_dispatcher_->RunScriptsAtDocumentEnd(render_frame);
144 } 143 }
145 144
146 ExtensionsClient* ShellContentRendererClient::CreateExtensionsClient() { 145 ExtensionsClient* ShellContentRendererClient::CreateExtensionsClient() {
147 return new ShellExtensionsClient; 146 return new ShellExtensionsClient;
148 } 147 }
149 148
150 } // namespace extensions 149 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/shell/renderer/shell_content_renderer_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698