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

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

Issue 598173003: Run clang-modernize -use-nullptr over src/extensions/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
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/renderer/render_frame.h" 7 #include "content/public/renderer/render_frame.h"
8 #include "content/public/renderer/render_frame_observer.h" 8 #include "content/public/renderer/render_frame_observer.h"
9 #include "content/public/renderer/render_frame_observer_tracker.h" 9 #include "content/public/renderer/render_frame_observer_tracker.h"
10 #include "content/public/renderer/render_thread.h" 10 #include "content/public/renderer/render_thread.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 const blink::WebPluginParams& params, 119 const blink::WebPluginParams& params,
120 blink::WebPlugin** plugin) { 120 blink::WebPlugin** plugin) {
121 // Allow the content module to create the plugin. 121 // Allow the content module to create the plugin.
122 return false; 122 return false;
123 } 123 }
124 124
125 blink::WebPlugin* ShellContentRendererClient::CreatePluginReplacement( 125 blink::WebPlugin* ShellContentRendererClient::CreatePluginReplacement(
126 content::RenderFrame* render_frame, 126 content::RenderFrame* render_frame,
127 const base::FilePath& plugin_path) { 127 const base::FilePath& plugin_path) {
128 // Don't provide a custom "failed to load" plugin. 128 // Don't provide a custom "failed to load" plugin.
129 return NULL; 129 return nullptr;
130 } 130 }
131 131
132 bool ShellContentRendererClient::WillSendRequest( 132 bool ShellContentRendererClient::WillSendRequest(
133 blink::WebFrame* frame, 133 blink::WebFrame* frame,
134 ui::PageTransition transition_type, 134 ui::PageTransition transition_type,
135 const GURL& url, 135 const GURL& url,
136 const GURL& first_party_for_cookies, 136 const GURL& first_party_for_cookies,
137 GURL* new_url) { 137 GURL* new_url) {
138 // TODO(jamescook): Cause an error for bad extension scheme requests? 138 // TODO(jamescook): Cause an error for bad extension scheme requests?
139 return false; 139 return false;
140 } 140 }
141 141
142 void ShellContentRendererClient::DidCreateScriptContext( 142 void ShellContentRendererClient::DidCreateScriptContext(
143 WebFrame* frame, 143 WebFrame* frame,
144 v8::Handle<v8::Context> context, 144 v8::Handle<v8::Context> context,
145 int extension_group, 145 int extension_group,
146 int world_id) { 146 int world_id) {
147 extension_dispatcher_->DidCreateScriptContext( 147 extension_dispatcher_->DidCreateScriptContext(
148 frame, context, extension_group, world_id); 148 frame, context, extension_group, world_id);
149 } 149 }
150 150
151 const void* ShellContentRendererClient::CreatePPAPIInterface( 151 const void* ShellContentRendererClient::CreatePPAPIInterface(
152 const std::string& interface_name) { 152 const std::string& interface_name) {
153 #if !defined(DISABLE_NACL) 153 #if !defined(DISABLE_NACL)
154 if (interface_name == PPB_NACL_PRIVATE_INTERFACE) 154 if (interface_name == PPB_NACL_PRIVATE_INTERFACE)
155 return nacl::GetNaClPrivateInterface(); 155 return nacl::GetNaClPrivateInterface();
156 #endif 156 #endif
157 return NULL; 157 return nullptr;
158 } 158 }
159 159
160 bool ShellContentRendererClient::IsExternalPepperPlugin( 160 bool ShellContentRendererClient::IsExternalPepperPlugin(
161 const std::string& module_name) { 161 const std::string& module_name) {
162 #if !defined(DISABLE_NACL) 162 #if !defined(DISABLE_NACL)
163 // TODO(bbudge) remove this when the trusted NaCl plugin has been removed. 163 // TODO(bbudge) remove this when the trusted NaCl plugin has been removed.
164 // We must defer certain plugin events for NaCl instances since we switch 164 // We must defer certain plugin events for NaCl instances since we switch
165 // from the in-process to the out-of-process proxy after instantiating them. 165 // from the in-process to the out-of-process proxy after instantiating them.
166 return module_name == nacl::kNaClPluginName; 166 return module_name == nacl::kNaClPluginName;
167 #else 167 #else
168 return false; 168 return false;
169 #endif 169 #endif
170 } 170 }
171 171
172 bool ShellContentRendererClient::ShouldEnableSiteIsolationPolicy() const { 172 bool ShellContentRendererClient::ShouldEnableSiteIsolationPolicy() const {
173 // Extension renderers don't need site isolation. 173 // Extension renderers don't need site isolation.
174 return false; 174 return false;
175 } 175 }
176 176
177 content::BrowserPluginDelegate* 177 content::BrowserPluginDelegate*
178 ShellContentRendererClient::CreateBrowserPluginDelegate( 178 ShellContentRendererClient::CreateBrowserPluginDelegate(
179 content::RenderFrame* render_frame, 179 content::RenderFrame* render_frame,
180 const std::string& mime_type) { 180 const std::string& mime_type) {
181 return new extensions::GuestViewContainer(render_frame, mime_type); 181 return new extensions::GuestViewContainer(render_frame, mime_type);
182 } 182 }
183 183
184 } // namespace extensions 184 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698