| 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 962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 973 WebRuntimeFeatures::enableDeviceMotion( | 973 WebRuntimeFeatures::enableDeviceMotion( |
| 974 command_line.HasSwitch(switches::kEnableDeviceMotion)); | 974 command_line.HasSwitch(switches::kEnableDeviceMotion)); |
| 975 | 975 |
| 976 WebRuntimeFeatures::enableDeviceOrientation( | 976 WebRuntimeFeatures::enableDeviceOrientation( |
| 977 !command_line.HasSwitch(switches::kDisableDeviceOrientation)); | 977 !command_line.HasSwitch(switches::kDisableDeviceOrientation)); |
| 978 | 978 |
| 979 WebRuntimeFeatures::enableSpeechInput(is_speech_input_enabled_); | 979 WebRuntimeFeatures::enableSpeechInput(is_speech_input_enabled_); |
| 980 | 980 |
| 981 WebRuntimeFeatures::enableFileSystem( | 981 WebRuntimeFeatures::enableFileSystem( |
| 982 !command_line.HasSwitch(switches::kDisableFileSystem)); | 982 !command_line.HasSwitch(switches::kDisableFileSystem)); |
| 983 |
| 984 WebRuntimeFeatures::enableExperimentalI18NAPI( |
| 985 command_line.HasSwitch(switches::kEnableJavaScriptI18NAPI)); |
| 983 } | 986 } |
| 984 | 987 |
| 985 void RenderThread::IdleHandler() { | 988 void RenderThread::IdleHandler() { |
| 986 #if (defined(OS_WIN) || defined(OS_LINUX)) && defined(USE_TCMALLOC) | 989 #if (defined(OS_WIN) || defined(OS_LINUX)) && defined(USE_TCMALLOC) |
| 987 MallocExtension::instance()->ReleaseFreeMemory(); | 990 MallocExtension::instance()->ReleaseFreeMemory(); |
| 988 #endif | 991 #endif |
| 989 | 992 |
| 990 v8::V8::IdleNotification(); | 993 v8::V8::IdleNotification(); |
| 991 | 994 |
| 992 // Schedule next invocation. | 995 // Schedule next invocation. |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1158 } | 1161 } |
| 1159 | 1162 |
| 1160 return false; | 1163 return false; |
| 1161 } | 1164 } |
| 1162 | 1165 |
| 1163 void RenderThread::RegisterExtension(v8::Extension* extension, | 1166 void RenderThread::RegisterExtension(v8::Extension* extension, |
| 1164 bool restrict_to_extensions) { | 1167 bool restrict_to_extensions) { |
| 1165 WebScriptController::registerExtension(extension); | 1168 WebScriptController::registerExtension(extension); |
| 1166 v8_extensions_[extension->name()] = restrict_to_extensions; | 1169 v8_extensions_[extension->name()] = restrict_to_extensions; |
| 1167 } | 1170 } |
| OLD | NEW |