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

Unified Diff: ui/events/event_utils.cc

Issue 134773004: Include external touchscreen vid/pid in UMA hardware profile (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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
Index: ui/events/event_utils.cc
diff --git a/ui/events/event_utils.cc b/ui/events/event_utils.cc
index 8a3ba6699fedc37c674b88f900a9286aedceac50..b6b4f657335e627d4968399a30b1376532a10f36 100644
--- a/ui/events/event_utils.cc
+++ b/ui/events/event_utils.cc
@@ -26,18 +26,22 @@ base::TimeDelta EventTimeForNow() {
}
bool ShouldDefaultToNaturalScroll() {
+ return InternalDisplaySupportsTouch() == INTERNAL_DISPLAY_HAS_TOUCH_SUPPORT;
+}
+
+InternalDisplayHasTouchSupport InternalDisplaySupportsTouch() {
gfx::Screen* screen = gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE);
if (!screen)
oshima 2014/01/14 22:35:01 This should not happen. I was thinking to change s
- return false;
+ return INTERNAL_DISPLAY_UNKNOWN_TOUCH_SUPPORT;
const std::vector<gfx::Display>& displays = screen->GetAllDisplays();
for (std::vector<gfx::Display>::const_iterator it = displays.begin();
it != displays.end(); ++it) {
const gfx::Display& display = *it;
if (display.IsInternal() &&
display.touch_support() == gfx::Display::TOUCH_SUPPORT_AVAILABLE)
oshima 2014/01/14 22:35:01 you also need to check if it's UNKNOWN or not.
tdresser 2014/01/17 20:38:35 Done.
- return true;
+ return INTERNAL_DISPLAY_HAS_TOUCH_SUPPORT;
}
- return false;
+ return INTERNAL_DISPLAY_NO_TOUCH_SUPPORT;
}
} // namespace ui

Powered by Google App Engine
This is Rietveld 408576698