| 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 941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 952 WebRuntimeFeatures::enableDeviceMotion( | 952 WebRuntimeFeatures::enableDeviceMotion( |
| 953 command_line.HasSwitch(switches::kEnableDeviceMotion)); | 953 command_line.HasSwitch(switches::kEnableDeviceMotion)); |
| 954 | 954 |
| 955 WebRuntimeFeatures::enableDeviceOrientation( | 955 WebRuntimeFeatures::enableDeviceOrientation( |
| 956 !command_line.HasSwitch(switches::kDisableDeviceOrientation)); | 956 !command_line.HasSwitch(switches::kDisableDeviceOrientation)); |
| 957 | 957 |
| 958 WebRuntimeFeatures::enableSpeechInput(is_speech_input_enabled_); | 958 WebRuntimeFeatures::enableSpeechInput(is_speech_input_enabled_); |
| 959 | 959 |
| 960 WebRuntimeFeatures::enableFileSystem( | 960 WebRuntimeFeatures::enableFileSystem( |
| 961 !command_line.HasSwitch(switches::kDisableFileSystem)); | 961 !command_line.HasSwitch(switches::kDisableFileSystem)); |
| 962 |
| 963 WebRuntimeFeatures::enableJavaScriptI18NAPI( |
| 964 command_line.HasSwitch(switches::kEnableJavaScriptI18NAPI)); |
| 962 } | 965 } |
| 963 | 966 |
| 964 void RenderThread::IdleHandler() { | 967 void RenderThread::IdleHandler() { |
| 965 #if (defined(OS_WIN) || defined(OS_LINUX)) && defined(USE_TCMALLOC) | 968 #if (defined(OS_WIN) || defined(OS_LINUX)) && defined(USE_TCMALLOC) |
| 966 MallocExtension::instance()->ReleaseFreeMemory(); | 969 MallocExtension::instance()->ReleaseFreeMemory(); |
| 967 #endif | 970 #endif |
| 968 | 971 |
| 969 v8::V8::IdleNotification(); | 972 v8::V8::IdleNotification(); |
| 970 | 973 |
| 971 // Schedule next invocation. | 974 // Schedule next invocation. |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1124 } | 1127 } |
| 1125 | 1128 |
| 1126 return false; | 1129 return false; |
| 1127 } | 1130 } |
| 1128 | 1131 |
| 1129 void RenderThread::RegisterExtension(v8::Extension* extension, | 1132 void RenderThread::RegisterExtension(v8::Extension* extension, |
| 1130 bool restrict_to_extensions) { | 1133 bool restrict_to_extensions) { |
| 1131 WebScriptController::registerExtension(extension); | 1134 WebScriptController::registerExtension(extension); |
| 1132 v8_extensions_[extension->name()] = restrict_to_extensions; | 1135 v8_extensions_[extension->name()] = restrict_to_extensions; |
| 1133 } | 1136 } |
| OLD | NEW |