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 871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
882 WebRuntimeFeatures::enableIndexedDatabase( | 882 WebRuntimeFeatures::enableIndexedDatabase( |
883 command_line.HasSwitch(switches::kEnableIndexedDatabase)); | 883 command_line.HasSwitch(switches::kEnableIndexedDatabase)); |
884 | 884 |
885 WebRuntimeFeatures::enableGeolocation( | 885 WebRuntimeFeatures::enableGeolocation( |
886 !command_line.HasSwitch(switches::kDisableGeolocation)); | 886 !command_line.HasSwitch(switches::kDisableGeolocation)); |
887 | 887 |
888 WebRuntimeFeatures::enableWebGL( | 888 WebRuntimeFeatures::enableWebGL( |
889 command_line.HasSwitch(switches::kEnableExperimentalWebGL)); | 889 command_line.HasSwitch(switches::kEnableExperimentalWebGL)); |
890 | 890 |
891 WebRuntimeFeatures::enablePushState(true); | 891 WebRuntimeFeatures::enablePushState(true); |
| 892 |
| 893 WebRuntimeFeatures::enableTouch( |
| 894 command_line.HasSwitch(switches::kEnableTouch)); |
892 } | 895 } |
893 | 896 |
894 void RenderThread::IdleHandler() { | 897 void RenderThread::IdleHandler() { |
895 #if (defined(OS_WIN) || defined(OS_LINUX)) && defined(USE_TCMALLOC) | 898 #if (defined(OS_WIN) || defined(OS_LINUX)) && defined(USE_TCMALLOC) |
896 MallocExtension::instance()->ReleaseFreeMemory(); | 899 MallocExtension::instance()->ReleaseFreeMemory(); |
897 #endif | 900 #endif |
898 | 901 |
899 LOG(INFO) << "RenderThread calling v8 IdleNotification for " << this; | 902 LOG(INFO) << "RenderThread calling v8 IdleNotification for " << this; |
900 v8::V8::IdleNotification(); | 903 v8::V8::IdleNotification(); |
901 | 904 |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1029 if (url.SchemeIs(chrome::kExtensionScheme)) | 1032 if (url.SchemeIs(chrome::kExtensionScheme)) |
1030 return url.host(); | 1033 return url.host(); |
1031 | 1034 |
1032 for (size_t i = 0; i < extension_extents_.size(); ++i) { | 1035 for (size_t i = 0; i < extension_extents_.size(); ++i) { |
1033 if (extension_extents_[i].web_extent.ContainsURL(url)) | 1036 if (extension_extents_[i].web_extent.ContainsURL(url)) |
1034 return extension_extents_[i].extension_id; | 1037 return extension_extents_[i].extension_id; |
1035 } | 1038 } |
1036 | 1039 |
1037 return std::string(); | 1040 return std::string(); |
1038 } | 1041 } |
OLD | NEW |