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

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

Issue 10836349: CSS Media Query now reports touch-support accurately for Windows. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Patched namespace reference. Created 8 years, 3 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 | « no previous file | ui/base/touch/touch_device_win.h » ('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 f568f5a8ffeeaf320308ee0627b6cb381a8a0a30..128bbf8c636215b8e4615e1de1c863d3884263dc 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -71,6 +71,7 @@
#include "net/url_request/url_request_context_getter.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#include "ui/base/layout.h"
+#include "ui/base/touch/touch_device_win.h"
#include "ui/base/ui_base_switches.h"
#include "ui/gfx/display.h"
#include "ui/gfx/screen.h"
@@ -526,12 +527,13 @@ WebPreferences WebContentsImpl::GetWebkitPrefs(RenderViewHost* rvh,
command_line.HasSwitch(switches::kEnableCssShaders);
prefs.css_variables_enabled =
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_WIN)
+ prefs.device_supports_touch = ui::base::IsTouchDevicePresent();
+#endif
#if defined(OS_ANDROID)
prefs.device_supports_mouse = false;
#endif
« no previous file with comments | « no previous file | ui/base/touch/touch_device_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698