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 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
936 | 936 |
937 WebRuntimeFeatures::enablePushState(true); | 937 WebRuntimeFeatures::enablePushState(true); |
938 | 938 |
939 WebRuntimeFeatures::enableTouch( | 939 WebRuntimeFeatures::enableTouch( |
940 command_line.HasSwitch(switches::kEnableTouch)); | 940 command_line.HasSwitch(switches::kEnableTouch)); |
941 | 941 |
942 WebRuntimeFeatures::enableDeviceMotion( | 942 WebRuntimeFeatures::enableDeviceMotion( |
943 command_line.HasSwitch(switches::kEnableDeviceMotion)); | 943 command_line.HasSwitch(switches::kEnableDeviceMotion)); |
944 | 944 |
945 WebRuntimeFeatures::enableDeviceOrientation( | 945 WebRuntimeFeatures::enableDeviceOrientation( |
946 command_line.HasSwitch(switches::kEnableDeviceOrientation)); | 946 !command_line.HasSwitch(switches::kDisableDeviceOrientation)); |
947 | 947 |
948 WebRuntimeFeatures::enableSpeechInput( | 948 WebRuntimeFeatures::enableSpeechInput( |
949 command_line.HasSwitch(switches::kEnableSpeechInput)); | 949 command_line.HasSwitch(switches::kEnableSpeechInput)); |
950 } | 950 } |
951 | 951 |
952 void RenderThread::IdleHandler() { | 952 void RenderThread::IdleHandler() { |
953 #if (defined(OS_WIN) || defined(OS_LINUX)) && defined(USE_TCMALLOC) | 953 #if (defined(OS_WIN) || defined(OS_LINUX)) && defined(USE_TCMALLOC) |
954 MallocExtension::instance()->ReleaseFreeMemory(); | 954 MallocExtension::instance()->ReleaseFreeMemory(); |
955 #endif | 955 #endif |
956 | 956 |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1105 | 1105 |
1106 scoped_refptr<base::MessageLoopProxy> | 1106 scoped_refptr<base::MessageLoopProxy> |
1107 RenderThread::GetFileThreadMessageLoopProxy() { | 1107 RenderThread::GetFileThreadMessageLoopProxy() { |
1108 DCHECK(message_loop() == MessageLoop::current()); | 1108 DCHECK(message_loop() == MessageLoop::current()); |
1109 if (!file_thread_.get()) { | 1109 if (!file_thread_.get()) { |
1110 file_thread_.reset(new base::Thread("Renderer::FILE")); | 1110 file_thread_.reset(new base::Thread("Renderer::FILE")); |
1111 file_thread_->Start(); | 1111 file_thread_->Start(); |
1112 } | 1112 } |
1113 return file_thread_->message_loop_proxy(); | 1113 return file_thread_->message_loop_proxy(); |
1114 } | 1114 } |
OLD | NEW |