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

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: Moved IsTouchDevicePresent to ui::base 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 | « no previous file | ui/base/touch/touch_device.h » ('j') | ui/base/touch/touch_device.h » ('J')
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 9ddb933647a214c67079585f793cd8fa7467ce2c..1f7db085a38f87653251e71a46bb52d9c1e9c9ea 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -15,6 +15,7 @@
#include "base/sys_info.h"
#include "base/time.h"
#include "base/utf_string_conversions.h"
+#include "base/win/win_util.h"
sky 2012/08/23 22:54:34 Remove this.
girard 2012/08/24 14:30:12 Done.
#include "content/browser/browser_plugin/old/old_browser_plugin_host.h"
#include "content/browser/child_process_security_policy_impl.h"
#include "content/browser/debugger/devtools_manager_impl.h"
@@ -71,6 +72,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.h"
#include "ui/base/ui_base_switches.h"
#include "ui/gfx/display.h"
#include "ui/gfx/screen.h"
@@ -526,12 +528,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.h » ('j') | ui/base/touch/touch_device.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698