| 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 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 518 WebPlugin** plugin) { | 518 WebPlugin** plugin) { |
| 519 std::string orig_mime_type = params.mimeType.utf8(); | 519 std::string orig_mime_type = params.mimeType.utf8(); |
| 520 if (orig_mime_type == content::kBrowserPluginMimeType) { | 520 if (orig_mime_type == content::kBrowserPluginMimeType) { |
| 521 WebDocument document = frame->document(); | 521 WebDocument document = frame->document(); |
| 522 const Extension* extension = | 522 const Extension* extension = |
| 523 GetExtensionByOrigin(document.securityOrigin()); | 523 GetExtensionByOrigin(document.securityOrigin()); |
| 524 if (extension) { | 524 if (extension) { |
| 525 const extensions::APIPermission::ID perms[] = { | 525 const extensions::APIPermission::ID perms[] = { |
| 526 extensions::APIPermission::kAppView, | 526 extensions::APIPermission::kAppView, |
| 527 extensions::APIPermission::kWebView, | 527 extensions::APIPermission::kWebView, |
| 528 extensions::APIPermission::kEmbeddedExtensionOptions, |
| 528 }; | 529 }; |
| 529 for (size_t i = 0; i < arraysize(perms); ++i) { | 530 for (size_t i = 0; i < arraysize(perms); ++i) { |
| 530 if (extension->permissions_data()->HasAPIPermission(perms[i])) | 531 if (extension->permissions_data()->HasAPIPermission(perms[i])) |
| 531 return false; | 532 return false; |
| 532 } | 533 } |
| 533 } | 534 } |
| 534 } | 535 } |
| 535 | 536 |
| 536 ChromeViewHostMsg_GetPluginInfo_Output output; | 537 ChromeViewHostMsg_GetPluginInfo_Output output; |
| 537 #if defined(ENABLE_PLUGINS) | 538 #if defined(ENABLE_PLUGINS) |
| (...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1491 #if defined(ENABLE_PLUGINS) | 1492 #if defined(ENABLE_PLUGINS) |
| 1492 if (CommandLine::ForCurrentProcess()->HasSwitch( | 1493 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 1493 switches::kEnablePepperTesting)) | 1494 switches::kEnablePepperTesting)) |
| 1494 return true; | 1495 return true; |
| 1495 return IsExtensionOrSharedModuleWhitelisted(url, | 1496 return IsExtensionOrSharedModuleWhitelisted(url, |
| 1496 allowed_video_decode_origins_); | 1497 allowed_video_decode_origins_); |
| 1497 #else | 1498 #else |
| 1498 return false; | 1499 return false; |
| 1499 #endif | 1500 #endif |
| 1500 } | 1501 } |
| OLD | NEW |