| 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 875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 886 WebRuntimeFeatures::enableGeolocation( | 886 WebRuntimeFeatures::enableGeolocation( |
| 887 !command_line.HasSwitch(switches::kDisableGeolocation)); | 887 !command_line.HasSwitch(switches::kDisableGeolocation)); |
| 888 | 888 |
| 889 WebRuntimeFeatures::enableWebGL( | 889 WebRuntimeFeatures::enableWebGL( |
| 890 command_line.HasSwitch(switches::kEnableExperimentalWebGL)); | 890 command_line.HasSwitch(switches::kEnableExperimentalWebGL)); |
| 891 | 891 |
| 892 WebRuntimeFeatures::enablePushState(true); | 892 WebRuntimeFeatures::enablePushState(true); |
| 893 | 893 |
| 894 WebRuntimeFeatures::enableTouch( | 894 WebRuntimeFeatures::enableTouch( |
| 895 command_line.HasSwitch(switches::kEnableTouch)); | 895 command_line.HasSwitch(switches::kEnableTouch)); |
| 896 |
| 897 WebRuntimeFeatures::enableDeviceOrientation( |
| 898 command_line.HasSwitch(switches::kEnableDeviceOrientation)); |
| 896 } | 899 } |
| 897 | 900 |
| 898 void RenderThread::IdleHandler() { | 901 void RenderThread::IdleHandler() { |
| 899 #if (defined(OS_WIN) || defined(OS_LINUX)) && defined(USE_TCMALLOC) | 902 #if (defined(OS_WIN) || defined(OS_LINUX)) && defined(USE_TCMALLOC) |
| 900 MallocExtension::instance()->ReleaseFreeMemory(); | 903 MallocExtension::instance()->ReleaseFreeMemory(); |
| 901 #endif | 904 #endif |
| 902 | 905 |
| 903 v8::V8::IdleNotification(); | 906 v8::V8::IdleNotification(); |
| 904 | 907 |
| 905 // Schedule next invocation. | 908 // Schedule next invocation. |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1041 } | 1044 } |
| 1042 | 1045 |
| 1043 std::string RenderThread::GetExtensionIdByBrowseExtent(const GURL& url) { | 1046 std::string RenderThread::GetExtensionIdByBrowseExtent(const GURL& url) { |
| 1044 for (size_t i = 0; i < extension_extents_.size(); ++i) { | 1047 for (size_t i = 0; i < extension_extents_.size(); ++i) { |
| 1045 if (extension_extents_[i].browse_extent.ContainsURL(url)) | 1048 if (extension_extents_[i].browse_extent.ContainsURL(url)) |
| 1046 return extension_extents_[i].extension_id; | 1049 return extension_extents_[i].extension_id; |
| 1047 } | 1050 } |
| 1048 | 1051 |
| 1049 return std::string(); | 1052 return std::string(); |
| 1050 } | 1053 } |
| OLD | NEW |