| 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 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 WebLocalFrame* frame, | 516 WebLocalFrame* frame, |
| 517 const WebPluginParams& params, | 517 const WebPluginParams& params, |
| 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::kEmbeddedExtensionOptions, |
| 528 extensions::APIPermission::kWebView, |
| 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 961 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1499 | 1500 |
| 1500 if (IsExtensionOrSharedModuleWhitelisted(url, allowed_video_decode_origins_)) | 1501 if (IsExtensionOrSharedModuleWhitelisted(url, allowed_video_decode_origins_)) |
| 1501 return true; | 1502 return true; |
| 1502 | 1503 |
| 1503 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel(); | 1504 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel(); |
| 1504 return channel <= chrome::VersionInfo::CHANNEL_DEV; | 1505 return channel <= chrome::VersionInfo::CHANNEL_DEV; |
| 1505 #else | 1506 #else |
| 1506 return false; | 1507 return false; |
| 1507 #endif | 1508 #endif |
| 1508 } | 1509 } |
| OLD | NEW |