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 1619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1630 if (IsExtensionOrSharedModuleWhitelisted(url, allowed_compositor_origins_)) | 1630 if (IsExtensionOrSharedModuleWhitelisted(url, allowed_compositor_origins_)) |
1631 return true; | 1631 return true; |
1632 | 1632 |
1633 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel(); | 1633 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel(); |
1634 return channel <= chrome::VersionInfo::CHANNEL_DEV; | 1634 return channel <= chrome::VersionInfo::CHANNEL_DEV; |
1635 #else | 1635 #else |
1636 return false; | 1636 return false; |
1637 #endif | 1637 #endif |
1638 } | 1638 } |
1639 | 1639 |
| 1640 bool ChromeContentRendererClient::IsPluginAllowedToUseMulticastAPI() { |
| 1641 #if defined(ENABLE_PLUGINS) && defined(ENABLE_EXTENSIONS) |
| 1642 // Allow access for tests. |
| 1643 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 1644 switches::kEnablePepperTesting)) |
| 1645 return true; |
| 1646 |
| 1647 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel(); |
| 1648 return channel <= chrome::VersionInfo::CHANNEL_DEV; |
| 1649 #else |
| 1650 return false; |
| 1651 #endif |
| 1652 } |
| 1653 |
1640 content::BrowserPluginDelegate* | 1654 content::BrowserPluginDelegate* |
1641 ChromeContentRendererClient::CreateBrowserPluginDelegate( | 1655 ChromeContentRendererClient::CreateBrowserPluginDelegate( |
1642 content::RenderFrame* render_frame, | 1656 content::RenderFrame* render_frame, |
1643 const std::string& mime_type, | 1657 const std::string& mime_type, |
1644 const GURL& original_url) { | 1658 const GURL& original_url) { |
1645 #if defined(ENABLE_EXTENSIONS) | 1659 #if defined(ENABLE_EXTENSIONS) |
1646 if (mime_type == content::kBrowserPluginMimeType) { | 1660 if (mime_type == content::kBrowserPluginMimeType) { |
1647 return new extensions::ExtensionsGuestViewContainer(render_frame); | 1661 return new extensions::ExtensionsGuestViewContainer(render_frame); |
1648 } else { | 1662 } else { |
1649 return new extensions::MimeHandlerViewContainer( | 1663 return new extensions::MimeHandlerViewContainer( |
1650 render_frame, mime_type, original_url); | 1664 render_frame, mime_type, original_url); |
1651 } | 1665 } |
1652 #else | 1666 #else |
1653 return NULL; | 1667 return NULL; |
1654 #endif | 1668 #endif |
1655 } | 1669 } |
OLD | NEW |