Chromium Code Reviews| Index: ui/base/touch/touch_device.cc |
| diff --git a/ui/base/touch/touch_device.cc b/ui/base/touch/touch_device.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..1967a2e8a18fb51107017e689d4fa5a5849d20a7 |
| --- /dev/null |
| +++ b/ui/base/touch/touch_device.cc |
| @@ -0,0 +1,19 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "ui/base/touch/touch_device.h" |
| +#include "base/win/windows_version.h" |
|
sky
2012/08/23 22:54:34
nit: newline between 5/6 and 6/7
girard
2012/08/24 14:30:12
Done.
|
| +#include <windows.h> |
| + |
| +namespace ui { |
| +namespace base { |
| + |
| +bool IsTouchDevicePresent() { |
| + // Docs: http://msdn.microsoft.com/en-us/library/dd371581(VS.85).aspx |
| + return (::base::win::GetVersion() >= ::base::win::VERSION_WIN7) && |
| + (::GetSystemMetrics(SM_DIGITIZER) > 0); |
| +} |
| + |
| +} // namespace base |
| +} // namespace ui |