OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/renderer/render_thread.h" | 5 #include "content/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 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
599 | 599 |
600 WebRuntimeFeatures::enableFileSystem( | 600 WebRuntimeFeatures::enableFileSystem( |
601 !command_line.HasSwitch(switches::kDisableFileSystem)); | 601 !command_line.HasSwitch(switches::kDisableFileSystem)); |
602 | 602 |
603 WebRuntimeFeatures::enableJavaScriptI18NAPI( | 603 WebRuntimeFeatures::enableJavaScriptI18NAPI( |
604 !command_line.HasSwitch(switches::kDisableJavaScriptI18NAPI)); | 604 !command_line.HasSwitch(switches::kDisableJavaScriptI18NAPI)); |
605 | 605 |
606 WebRuntimeFeatures::enableQuota( | 606 WebRuntimeFeatures::enableQuota( |
607 command_line.HasSwitch(switches::kEnableQuota)); | 607 command_line.HasSwitch(switches::kEnableQuota)); |
608 | 608 |
| 609 WebRuntimeFeatures::enableSpellCheckAPI( |
| 610 !command_line.HasSwitch(switches::kDisableSpellcheckAPI)); |
| 611 |
609 FOR_EACH_OBSERVER(RenderProcessObserver, observers_, WebKitInitialized()); | 612 FOR_EACH_OBSERVER(RenderProcessObserver, observers_, WebKitInitialized()); |
610 } | 613 } |
611 | 614 |
612 void RenderThread::IdleHandler() { | 615 void RenderThread::IdleHandler() { |
613 #if (defined(OS_WIN) || defined(OS_LINUX)) && defined(USE_TCMALLOC) | 616 #if (defined(OS_WIN) || defined(OS_LINUX)) && defined(USE_TCMALLOC) |
614 MallocExtension::instance()->ReleaseFreeMemory(); | 617 MallocExtension::instance()->ReleaseFreeMemory(); |
615 #endif | 618 #endif |
616 | 619 |
617 v8::V8::IdleNotification(); | 620 v8::V8::IdleNotification(); |
618 | 621 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
676 | 679 |
677 void RenderThread::RegisterExtension(v8::Extension* extension) { | 680 void RenderThread::RegisterExtension(v8::Extension* extension) { |
678 WebScriptController::registerExtension(extension); | 681 WebScriptController::registerExtension(extension); |
679 v8_extensions_.insert(extension->name()); | 682 v8_extensions_.insert(extension->name()); |
680 } | 683 } |
681 | 684 |
682 bool RenderThread::IsRegisteredExtension( | 685 bool RenderThread::IsRegisteredExtension( |
683 const std::string& v8_extension_name) const { | 686 const std::string& v8_extension_name) const { |
684 return v8_extensions_.find(v8_extension_name) != v8_extensions_.end(); | 687 return v8_extensions_.find(v8_extension_name) != v8_extensions_.end(); |
685 } | 688 } |
OLD | NEW |