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

Unified Diff: ash/display/display_info.cc

Issue 42863003: cros: Default to natural scrolling if the internal diplay is a touchscreen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 2 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 | « ash/display/display_info.h ('k') | ash/display/display_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/display_info.cc
diff --git a/ash/display/display_info.cc b/ash/display/display_info.cc
index fdaa80f58956d1d8bfb66cc7d24e54e289150c2f..c09dfc3cd3d80e4adfa325db17b4dd4f4ad110bf 100644
--- a/ash/display/display_info.cc
+++ b/ash/display/display_info.cc
@@ -137,6 +137,7 @@ DisplayInfo::DisplayInfo()
: id_(gfx::Display::kInvalidDisplayID),
has_overscan_(false),
rotation_(gfx::Display::ROTATE_0),
+ touch_support_(gfx::Display::TOUCH_SUPPORT_UNKNOWN),
device_scale_factor_(1.0f),
overscan_insets_in_dip_(0, 0, 0, 0),
ui_scale_(1.0f),
@@ -150,6 +151,7 @@ DisplayInfo::DisplayInfo(int64 id,
name_(name),
has_overscan_(has_overscan),
rotation_(gfx::Display::ROTATE_0),
+ touch_support_(gfx::Display::TOUCH_SUPPORT_UNKNOWN),
device_scale_factor_(1.0f),
overscan_insets_in_dip_(0, 0, 0, 0),
ui_scale_(1.0f),
@@ -169,6 +171,7 @@ void DisplayInfo::Copy(const DisplayInfo& native_info) {
size_in_pixel_ = native_info.size_in_pixel_;
device_scale_factor_ = native_info.device_scale_factor_;
resolutions_ = native_info.resolutions_;
+ touch_support_ = native_info.touch_support_;
// Copy overscan_insets_in_dip_ if it's not empty. This is for test
// cases which use "/o" annotation which sets the overscan inset
@@ -225,14 +228,17 @@ std::string DisplayInfo::ToString() const {
int rotation_degree = static_cast<int>(rotation_) * 90;
return base::StringPrintf(
"DisplayInfo[%lld] native bounds=%s, size=%s, scale=%f, "
- "overscan=%s, rotation=%d, ui-scale=%f",
+ "overscan=%s, rotation=%d, ui-scale=%f, touchscreen=%s",
static_cast<long long int>(id_),
bounds_in_native_.ToString().c_str(),
size_in_pixel_.ToString().c_str(),
device_scale_factor_,
overscan_insets_in_dip_.ToString().c_str(),
rotation_degree,
- ui_scale_);
+ ui_scale_,
+ touch_support_ == gfx::Display::TOUCH_SUPPORT_AVAILABLE ? "yes" :
+ touch_support_ == gfx::Display::TOUCH_SUPPORT_UNAVAILABLE ? "no" :
+ "unknown");
}
std::string DisplayInfo::ToFullString() const {
« no previous file with comments | « ash/display/display_info.h ('k') | ash/display/display_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698