diff options
author | shrikant@chromium.org <shrikant@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-24 21:56:12 +0000 |
---|---|---|
committer | shrikant@chromium.org <shrikant@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-24 21:56:12 +0000 |
commit | bb481b101a826c7415c096466a8c1e749b9521f8 (patch) | |
tree | 5af84d67bcb1d2b39f9f6198108f9552ff767ede /base/win | |
parent | 6fbda3b95694c64543e5e15594465031c27a367e (diff) | |
download | chromium_src-bb481b101a826c7415c096466a8c1e749b9521f8.zip chromium_src-bb481b101a826c7415c096466a8c1e749b9521f8.tar.gz chromium_src-bb481b101a826c7415c096466a8c1e749b9521f8.tar.bz2 |
IsMachineATablet is now modified to check only for touch capability and hence name change as well.
Also added minor modification of checking viewer connection process for immersive mode.
BUG=223778
TEST=none
Review URL: https://chromiumcodereview.appspot.com/14061007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@196242 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/win')
-rw-r--r-- | base/win/win_util.cc | 11 | ||||
-rw-r--r-- | base/win/win_util.h | 6 |
2 files changed, 5 insertions, 12 deletions
diff --git a/base/win/win_util.cc b/base/win/win_util.cc index acdc907..3d12f77 100644 --- a/base/win/win_util.cc +++ b/base/win/win_util.cc @@ -214,20 +214,13 @@ void SetAbortBehaviorForCrashReporting() { signal(SIGABRT, ForceCrashOnSigAbort); } -bool IsMachineATablet() { +bool IsTouchEnabledDevice() { if (base::win::GetVersion() < base::win::VERSION_WIN7) return false; const int kMultiTouch = NID_INTEGRATED_TOUCH | NID_MULTI_INPUT | NID_READY; - const int kMaxTabletScreenWidth = 1366; - const int kMaxTabletScreenHeight = 768; int sm = GetSystemMetrics(SM_DIGITIZER); if ((sm & kMultiTouch) == kMultiTouch) { - int cx = GetSystemMetrics(SM_CXSCREEN); - int cy = GetSystemMetrics(SM_CYSCREEN); - // Handle landscape and portrait modes. - return cx > cy ? - (cx <= kMaxTabletScreenWidth && cy <= kMaxTabletScreenHeight) : - (cy <= kMaxTabletScreenWidth && cx <= kMaxTabletScreenHeight); + return true; } return false; } diff --git a/base/win/win_util.h b/base/win/win_util.h index 0404ef0..78390be0 100644 --- a/base/win/win_util.h +++ b/base/win/win_util.h @@ -102,9 +102,9 @@ BASE_EXPORT bool ShouldCrashOnProcessDetach(); // process is aborted. BASE_EXPORT void SetAbortBehaviorForCrashReporting(); -// A tablet by this definition is something that has integrated multi-touch -// ready to use and also has screen resolution not greater than 1366x768. -BASE_EXPORT bool IsMachineATablet(); +// A touch enabled device by this definition is something that has +// integrated multi-touch ready to use and has Windows version > Windows7. +BASE_EXPORT bool IsTouchEnabledDevice(); // Get the size of a struct up to and including the specified member. // This is necessary to set compatible struct sizes for different versions |