| OLD | NEW |
| 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/renderer/chrome_content_renderer_client.h" | 5 #include "chrome/renderer/chrome_content_renderer_client.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/debug/crash_logging.h" | 8 #include "base/debug/crash_logging.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 1299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1310 } | 1310 } |
| 1311 | 1311 |
| 1312 bool ChromeContentRendererClient::IsExternalPepperPlugin( | 1312 bool ChromeContentRendererClient::IsExternalPepperPlugin( |
| 1313 const std::string& module_name) { | 1313 const std::string& module_name) { |
| 1314 // TODO(bbudge) remove this when the trusted NaCl plugin has been removed. | 1314 // TODO(bbudge) remove this when the trusted NaCl plugin has been removed. |
| 1315 // We must defer certain plugin events for NaCl instances since we switch | 1315 // We must defer certain plugin events for NaCl instances since we switch |
| 1316 // from the in-process to the out-of-process proxy after instantiating them. | 1316 // from the in-process to the out-of-process proxy after instantiating them. |
| 1317 return module_name == "Native Client"; | 1317 return module_name == "Native Client"; |
| 1318 } | 1318 } |
| 1319 | 1319 |
| 1320 bool ChromeContentRendererClient::IsExtensionOrSharedModuleWhitelisted( |
| 1321 const GURL& url, const std::set<std::string>& whitelist) { |
| 1322 const extensions::ExtensionSet* extension_set = |
| 1323 g_current_client->extension_dispatcher_->extensions(); |
| 1324 return chrome::IsExtensionOrSharedModuleWhitelisted(url, extension_set, |
| 1325 whitelist); |
| 1326 } |
| 1327 |
| 1320 blink::WebSpeechSynthesizer* | 1328 blink::WebSpeechSynthesizer* |
| 1321 ChromeContentRendererClient::OverrideSpeechSynthesizer( | 1329 ChromeContentRendererClient::OverrideSpeechSynthesizer( |
| 1322 blink::WebSpeechSynthesizerClient* client) { | 1330 blink::WebSpeechSynthesizerClient* client) { |
| 1323 return new TtsDispatcher(client); | 1331 return new TtsDispatcher(client); |
| 1324 } | 1332 } |
| 1325 | 1333 |
| 1326 bool ChromeContentRendererClient::AllowBrowserPlugin( | 1334 bool ChromeContentRendererClient::AllowBrowserPlugin( |
| 1327 blink::WebPluginContainer* container) { | 1335 blink::WebPluginContainer* container) { |
| 1328 if (CommandLine::ForCurrentProcess()->HasSwitch( | 1336 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 1329 switches::kEnableBrowserPluginForAllViewTypes)) | 1337 switches::kEnableBrowserPluginForAllViewTypes)) |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1391 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 1399 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 1392 return !command_line->HasSwitch(switches::kExtensionProcess); | 1400 return !command_line->HasSwitch(switches::kExtensionProcess); |
| 1393 } | 1401 } |
| 1394 | 1402 |
| 1395 blink::WebWorkerPermissionClientProxy* | 1403 blink::WebWorkerPermissionClientProxy* |
| 1396 ChromeContentRendererClient::CreateWorkerPermissionClientProxy( | 1404 ChromeContentRendererClient::CreateWorkerPermissionClientProxy( |
| 1397 content::RenderFrame* render_frame, | 1405 content::RenderFrame* render_frame, |
| 1398 blink::WebFrame* frame) { | 1406 blink::WebFrame* frame) { |
| 1399 return new WorkerPermissionClientProxy(render_frame, frame); | 1407 return new WorkerPermissionClientProxy(render_frame, frame); |
| 1400 } | 1408 } |
| OLD | NEW |