| 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 "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "content/common/content_switches_internal.h" | 8 #include "content/common/content_switches_internal.h" |
| 9 #include "content/public/common/content_switches.h" | 9 #include "content/public/common/content_switches.h" |
| 10 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" | 10 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 // Screen Orientation API is currently broken on Windows 8 Metro mode and | 74 // Screen Orientation API is currently broken on Windows 8 Metro mode and |
| 75 // until we can find how to disable it only for Blink instances running in a | 75 // until we can find how to disable it only for Blink instances running in a |
| 76 // renderer process in Metro, we need to disable the API altogether for Win8. | 76 // renderer process in Metro, we need to disable the API altogether for Win8. |
| 77 // See http://crbug.com/400846 | 77 // See http://crbug.com/400846 |
| 78 if (base::win::OSInfo::GetInstance()->version() >= base::win::VERSION_WIN8) | 78 if (base::win::OSInfo::GetInstance()->version() >= base::win::VERSION_WIN8) |
| 79 WebRuntimeFeatures::enableScreenOrientation(false); | 79 WebRuntimeFeatures::enableScreenOrientation(false); |
| 80 #endif // OS_WIN | 80 #endif // OS_WIN |
| 81 } | 81 } |
| 82 | 82 |
| 83 void SetRuntimeFeaturesDefaultsAndUpdateFromArgs( | 83 void SetRuntimeFeaturesDefaultsAndUpdateFromArgs( |
| 84 const CommandLine& command_line) { | 84 const base::CommandLine& command_line) { |
| 85 if (command_line.HasSwitch(switches::kEnableExperimentalWebPlatformFeatures)) | 85 if (command_line.HasSwitch(switches::kEnableExperimentalWebPlatformFeatures)) |
| 86 WebRuntimeFeatures::enableExperimentalFeatures(true); | 86 WebRuntimeFeatures::enableExperimentalFeatures(true); |
| 87 | 87 |
| 88 SetRuntimeFeatureDefaultsForPlatform(); | 88 SetRuntimeFeatureDefaultsForPlatform(); |
| 89 | 89 |
| 90 if (command_line.HasSwitch(switches::kDisableDatabases)) | 90 if (command_line.HasSwitch(switches::kDisableDatabases)) |
| 91 WebRuntimeFeatures::enableDatabase(false); | 91 WebRuntimeFeatures::enableDatabase(false); |
| 92 | 92 |
| 93 if (command_line.HasSwitch(switches::kDisableApplicationCache)) | 93 if (command_line.HasSwitch(switches::kDisableApplicationCache)) |
| 94 WebRuntimeFeatures::enableApplicationCache(false); | 94 WebRuntimeFeatures::enableApplicationCache(false); |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 WebRuntimeFeatures::enableLayerSquashing(true); | 173 WebRuntimeFeatures::enableLayerSquashing(true); |
| 174 | 174 |
| 175 if (command_line.HasSwitch(switches::kEnableNetworkInformation) || | 175 if (command_line.HasSwitch(switches::kEnableNetworkInformation) || |
| 176 command_line.HasSwitch( | 176 command_line.HasSwitch( |
| 177 switches::kEnableExperimentalWebPlatformFeatures)) { | 177 switches::kEnableExperimentalWebPlatformFeatures)) { |
| 178 WebRuntimeFeatures::enableNetworkInformation(true); | 178 WebRuntimeFeatures::enableNetworkInformation(true); |
| 179 } | 179 } |
| 180 } | 180 } |
| 181 | 181 |
| 182 } // namespace content | 182 } // namespace content |
| OLD | NEW |