| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/child/runtime_features.h" | 5 #include "content/child/runtime_features.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/feature_list.h" | 10 #include "base/feature_list.h" |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 #if defined(OS_MACOSX) | 128 #if defined(OS_MACOSX) |
| 129 bool enable_web_gl_image_chromium = command_line.HasSwitch( | 129 bool enable_web_gl_image_chromium = command_line.HasSwitch( |
| 130 switches::kEnableGpuMemoryBufferCompositorResources) && | 130 switches::kEnableGpuMemoryBufferCompositorResources) && |
| 131 !command_line.HasSwitch(switches::kDisableWebGLImageChromium) && | 131 !command_line.HasSwitch(switches::kDisableWebGLImageChromium) && |
| 132 !command_line.HasSwitch(switches::kDisableGpu); | 132 !command_line.HasSwitch(switches::kDisableGpu); |
| 133 | 133 |
| 134 if (enable_web_gl_image_chromium) { | 134 if (enable_web_gl_image_chromium) { |
| 135 enable_web_gl_image_chromium = | 135 enable_web_gl_image_chromium = |
| 136 base::FeatureList::IsEnabled(features::kWebGLImageChromium); | 136 base::FeatureList::IsEnabled(features::kWebGLImageChromium); |
| 137 } | 137 } |
| 138 enable_web_gl_image_chromium = false; |
| 138 #else | 139 #else |
| 139 bool enable_web_gl_image_chromium = | 140 bool enable_web_gl_image_chromium = |
| 140 command_line.HasSwitch(switches::kEnableWebGLImageChromium); | 141 command_line.HasSwitch(switches::kEnableWebGLImageChromium); |
| 141 #endif | 142 #endif |
| 142 WebRuntimeFeatures::enableWebGLImageChromium(enable_web_gl_image_chromium); | 143 WebRuntimeFeatures::enableWebGLImageChromium(enable_web_gl_image_chromium); |
| 143 | 144 |
| 144 if (command_line.HasSwitch(switches::kForceOverlayFullscreenVideo)) | 145 if (command_line.HasSwitch(switches::kForceOverlayFullscreenVideo)) |
| 145 WebRuntimeFeatures::forceOverlayFullscreenVideo(true); | 146 WebRuntimeFeatures::forceOverlayFullscreenVideo(true); |
| 146 | 147 |
| 147 if (ui::IsOverlayScrollbarEnabled()) | 148 if (ui::IsOverlayScrollbarEnabled()) |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 257 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
| 257 std::vector<std::string> disabled_features = base::SplitString( | 258 std::vector<std::string> disabled_features = base::SplitString( |
| 258 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 259 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
| 259 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 260 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 260 for (const std::string& feature : disabled_features) | 261 for (const std::string& feature : disabled_features) |
| 261 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 262 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
| 262 } | 263 } |
| 263 } | 264 } |
| 264 | 265 |
| 265 } // namespace content | 266 } // namespace content |
| OLD | NEW |