| 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/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 plugin.type != WebPluginInfo::PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS) { | 237 plugin.type != WebPluginInfo::PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS) { |
| 238 return false; | 238 return false; |
| 239 } | 239 } |
| 240 | 240 |
| 241 #if !defined(DISABLE_NACL) | 241 #if !defined(DISABLE_NACL) |
| 242 // Treat Native Client invocations like JavaScript. | 242 // Treat Native Client invocations like JavaScript. |
| 243 if (plugin.name == ASCIIToUTF16(nacl::kNaClPluginName)) | 243 if (plugin.name == ASCIIToUTF16(nacl::kNaClPluginName)) |
| 244 return true; | 244 return true; |
| 245 #endif | 245 #endif |
| 246 | 246 |
| 247 #if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) | 247 #if defined(ENABLE_WIDEVINE) && defined(ENABLE_PEPPER_CDMS) |
| 248 // Treat CDM invocations like JavaScript. | 248 // Treat CDM invocations like JavaScript. |
| 249 if (plugin.name == ASCIIToUTF16(kWidevineCdmDisplayName)) { | 249 if (plugin.name == ASCIIToUTF16(kWidevineCdmDisplayName)) { |
| 250 DCHECK(plugin.type == WebPluginInfo::PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS); | 250 DCHECK(plugin.type == WebPluginInfo::PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS); |
| 251 return true; | 251 return true; |
| 252 } | 252 } |
| 253 #endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) | 253 #endif // defined(ENABLE_WIDEVINE) && defined(ENABLE_PEPPER_CDMS) |
| 254 | 254 |
| 255 return false; | 255 return false; |
| 256 } | 256 } |
| 257 | 257 |
| 258 #if defined(ENABLE_EXTENSIONS) | 258 #if defined(ENABLE_EXTENSIONS) |
| 259 void IsGuestViewApiAvailableToScriptContext( | 259 void IsGuestViewApiAvailableToScriptContext( |
| 260 bool* api_is_available, | 260 bool* api_is_available, |
| 261 extensions::ScriptContext* context) { | 261 extensions::ScriptContext* context) { |
| 262 if (context->GetAvailability("guestViewInternal").is_available()) { | 262 if (context->GetAvailability("guestViewInternal").is_available()) { |
| 263 *api_is_available = true; | 263 *api_is_available = true; |
| (...skipping 1288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1552 if (mime_type == content::kBrowserPluginMimeType) { | 1552 if (mime_type == content::kBrowserPluginMimeType) { |
| 1553 return new extensions::ExtensionsGuestViewContainer(render_frame); | 1553 return new extensions::ExtensionsGuestViewContainer(render_frame); |
| 1554 } else { | 1554 } else { |
| 1555 return new extensions::MimeHandlerViewContainer( | 1555 return new extensions::MimeHandlerViewContainer( |
| 1556 render_frame, mime_type, original_url); | 1556 render_frame, mime_type, original_url); |
| 1557 } | 1557 } |
| 1558 #else | 1558 #else |
| 1559 return NULL; | 1559 return NULL; |
| 1560 #endif | 1560 #endif |
| 1561 } | 1561 } |
| OLD | NEW |