Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(137)

Side by Side Diff: chrome/renderer/render_thread.cc

Issue 6366021: Adding support for JavaScript internationalization API as V8 extension. See p... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | webkit/tools/test_shell/test_shell_webkit_init.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | webkit/tools/test_shell/test_shell_webkit_init.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698