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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 10832252: Remove touch optimized layout on ChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | ui/base/layout.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index c70cbd09bbadece534bc5c460a622594275429d3..93371d0964594293a6d0320b85f2e50cae3a4511 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -82,6 +82,10 @@
#include "ui/surface/io_surface_support_mac.h"
#endif
+#if defined(USE_AURA) && defined(USE_X11)
+#include "ui/base/touch/touch_factory.h"
+#endif // defined (USE_AURA) && defined(USE_X11)
+
// Cross-Site Navigations
//
// If a WebContentsImpl is told to navigate to a different web site (as
@@ -532,6 +536,10 @@ WebPreferences WebContentsImpl::GetWebkitPrefs(RenderViewHost* rvh,
command_line.HasSwitch(switches::kEnableCssVariables);
prefs.device_supports_touch =
ui::GetDisplayLayout() == ui::LAYOUT_TOUCH;
+#if defined(USE_AURA) && defined(USE_X11)
+ prefs.device_supports_touch |=
+ ui::TouchFactory::GetInstance()->IsTouchDevicePresent();
+#endif
#if defined(OS_ANDROID)
prefs.device_supports_mouse = false;
#endif
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | ui/base/layout.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698