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

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

Issue 1575033: Create a command-line switch for enabling touch events. (Closed)
Patch Set: Enabling touch support by default in test_shell Created 10 years, 7 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
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | webkit/tools/test_shell/test_shell_webkit_init.h » ('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 871 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | webkit/tools/test_shell/test_shell_webkit_init.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698