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 1462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1473 return false; | 1473 return false; |
1474 #endif | 1474 #endif |
1475 } | 1475 } |
1476 | 1476 |
1477 bool ChromeContentRendererClient::IsPluginAllowedToUseCompositorAPI( | 1477 bool ChromeContentRendererClient::IsPluginAllowedToUseCompositorAPI( |
1478 const GURL& url) { | 1478 const GURL& url) { |
1479 #if defined(ENABLE_PLUGINS) | 1479 #if defined(ENABLE_PLUGINS) |
1480 if (CommandLine::ForCurrentProcess()->HasSwitch( | 1480 if (CommandLine::ForCurrentProcess()->HasSwitch( |
1481 switches::kEnablePepperTesting)) | 1481 switches::kEnablePepperTesting)) |
1482 return true; | 1482 return true; |
1483 return IsExtensionOrSharedModuleWhitelisted(url, allowed_compositor_origins_); | 1483 if (IsExtensionOrSharedModuleWhitelisted(url, allowed_compositor_origins_)) |
| 1484 return true; |
| 1485 |
| 1486 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel(); |
| 1487 return channel <= chrome::VersionInfo::CHANNEL_DEV; |
1484 #else | 1488 #else |
1485 return false; | 1489 return false; |
1486 #endif | 1490 #endif |
1487 } | 1491 } |
1488 | 1492 |
1489 bool ChromeContentRendererClient::IsPluginAllowedToUseVideoDecodeAPI( | 1493 bool ChromeContentRendererClient::IsPluginAllowedToUseVideoDecodeAPI( |
1490 const GURL& url) { | 1494 const GURL& url) { |
1491 #if defined(ENABLE_PLUGINS) | 1495 #if defined(ENABLE_PLUGINS) |
1492 if (CommandLine::ForCurrentProcess()->HasSwitch( | 1496 if (CommandLine::ForCurrentProcess()->HasSwitch( |
1493 switches::kEnablePepperTesting)) | 1497 switches::kEnablePepperTesting)) |
1494 return true; | 1498 return true; |
1495 return IsExtensionOrSharedModuleWhitelisted(url, | 1499 |
1496 allowed_video_decode_origins_); | 1500 if (IsExtensionOrSharedModuleWhitelisted(url, allowed_video_decode_origins_)) |
| 1501 return true; |
| 1502 |
| 1503 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel(); |
| 1504 return channel <= chrome::VersionInfo::CHANNEL_DEV; |
1497 #else | 1505 #else |
1498 return false; | 1506 return false; |
1499 #endif | 1507 #endif |
1500 } | 1508 } |
OLD | NEW |