diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-01-31 16:33:43 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-02-06 16:33:22 +0000 |
commit | da51f56cc21233c2d30f0fe0d171727c3102b2e0 (patch) | |
tree | 4e579ab70ce4b19bee7984237f3ce05a96d59d83 /chromium/base/win/win_util.h | |
parent | c8c2d1901aec01e934adf561a9fdf0cc776cdef8 (diff) |
BASELINE: Update Chromium to 65.0.3525.40
Also imports missing submodules
Change-Id: I36901b7c6a325cda3d2c10cedb2186c25af3b79b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'chromium/base/win/win_util.h')
-rw-r--r-- | chromium/base/win/win_util.h | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/chromium/base/win/win_util.h b/chromium/base/win/win_util.h index 570dad4ce8f..80da69e24ad 100644 --- a/chromium/base/win/win_util.h +++ b/chromium/base/win/win_util.h @@ -22,8 +22,8 @@ #ifndef BASE_WIN_WIN_UTIL_H_ #define BASE_WIN_WIN_UTIL_H_ -#include <windows.h> #include <stdint.h> +#include "base/win/windows_types.h" #include <string> #include <vector> @@ -35,6 +35,9 @@ struct IPropertyStore; struct _tagpropertykey; typedef _tagpropertykey PROPERTYKEY; +// _WINDOWS_ will be defined if Windows.h was included - include Windows.h first +// to get access to the full struct definition. +#if defined(_WINDOWS_) // This is the same as NONCLIENTMETRICS except that the // unused member |iPaddedBorderWidth| has been removed. struct NONCLIENTMETRICS_XP { @@ -54,6 +57,9 @@ struct NONCLIENTMETRICS_XP { LOGFONTW lfStatusFont; LOGFONTW lfMessageFont; }; +#else +struct NONCLIENTMETRICS_XP; +#endif namespace base { namespace win { @@ -138,17 +144,28 @@ BASE_EXPORT void SetAbortBehaviorForCrashReporting(); BASE_EXPORT bool IsWindows10TabletMode(HWND hwnd); // A tablet is a device that is touch enabled and also is being used -// "like a tablet". This is used by the following:- -// 1. Metrics:- To gain insight into how users use Chrome. -// 2. Physical keyboard presence :- If a device is in tablet mode, it means +// "like a tablet". This is used by the following: +// 1. Metrics: To gain insight into how users use Chrome. +// 2. Physical keyboard presence: If a device is in tablet mode, it means // that there is no physical keyboard attached. -// 3. To set the right interactions media queries, -// see https://drafts.csswg.org/mediaqueries-4/#mf-interaction // This function optionally sets the |reason| parameter to determine as to why // or why not a device was deemed to be a tablet. -// Returns true if the device is in tablet mode. +// Returns true if the user has set Windows 10 in tablet mode. BASE_EXPORT bool IsTabletDevice(std::string* reason, HWND hwnd); +// Return true if the device is physically used as a tablet independently of +// Windows tablet mode. It checks if the device: +// - Is running Windows 8 or newer, +// - Has a touch digitizer, +// - Is not docked, +// - Has a supported rotation sensor, +// - Is not in laptop mode, +// - prefers the mobile or slate power management profile (per OEM choice), and +// - Is in slate mode. +// This function optionally sets the |reason| parameter to determine as to why +// or why not a device was deemed to be a tablet. +BASE_EXPORT bool IsDeviceUsedAsATablet(std::string* reason); + // A slate is a touch device that may have a keyboard attached. This function // returns true if a keyboard is attached and optionally will set the |reason| // parameter to the detection method that was used to detect the keyboard. |