OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/render_thread.h" | 5 #include "chrome/renderer/render_thread.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <map> | 9 #include <map> |
10 #include <vector> | 10 #include <vector> |
(...skipping 919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
930 !command_line.HasSwitch(switches::kDisableLocalStorage)); | 930 !command_line.HasSwitch(switches::kDisableLocalStorage)); |
931 WebRuntimeFeatures::enableSessionStorage( | 931 WebRuntimeFeatures::enableSessionStorage( |
932 !command_line.HasSwitch(switches::kDisableSessionStorage)); | 932 !command_line.HasSwitch(switches::kDisableSessionStorage)); |
933 | 933 |
934 WebRuntimeFeatures::enableIndexedDatabase( | 934 WebRuntimeFeatures::enableIndexedDatabase( |
935 !command_line.HasSwitch(switches::kDisableIndexedDatabase)); | 935 !command_line.HasSwitch(switches::kDisableIndexedDatabase)); |
936 | 936 |
937 WebRuntimeFeatures::enableGeolocation( | 937 WebRuntimeFeatures::enableGeolocation( |
938 !command_line.HasSwitch(switches::kDisableGeolocation)); | 938 !command_line.HasSwitch(switches::kDisableGeolocation)); |
939 | 939 |
| 940 #ifdef HAS_WEBAUDIO_RUNTIMEFEATURES |
940 WebRuntimeFeatures::enableWebAudio( | 941 WebRuntimeFeatures::enableWebAudio( |
941 command_line.HasSwitch(switches::kEnableWebAudio)); | 942 command_line.HasSwitch(switches::kEnableWebAudio)); |
| 943 #endif |
942 | 944 |
943 WebRuntimeFeatures::enableWebGL( | 945 WebRuntimeFeatures::enableWebGL( |
944 !command_line.HasSwitch(switches::kDisable3DAPIs) && | 946 !command_line.HasSwitch(switches::kDisable3DAPIs) && |
945 !command_line.HasSwitch(switches::kDisableExperimentalWebGL)); | 947 !command_line.HasSwitch(switches::kDisableExperimentalWebGL)); |
946 | 948 |
947 WebRuntimeFeatures::enablePushState(true); | 949 WebRuntimeFeatures::enablePushState(true); |
948 | 950 |
949 WebRuntimeFeatures::enableTouch( | 951 WebRuntimeFeatures::enableTouch( |
950 command_line.HasSwitch(switches::kEnableTouch)); | 952 command_line.HasSwitch(switches::kEnableTouch)); |
951 | 953 |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1137 } | 1139 } |
1138 | 1140 |
1139 return false; | 1141 return false; |
1140 } | 1142 } |
1141 | 1143 |
1142 void RenderThread::RegisterExtension(v8::Extension* extension, | 1144 void RenderThread::RegisterExtension(v8::Extension* extension, |
1143 bool restrict_to_extensions) { | 1145 bool restrict_to_extensions) { |
1144 WebScriptController::registerExtension(extension); | 1146 WebScriptController::registerExtension(extension); |
1145 v8_extensions_[extension->name()] = restrict_to_extensions; | 1147 v8_extensions_[extension->name()] = restrict_to_extensions; |
1146 } | 1148 } |
OLD | NEW |