Roll src/third_party/WebKit c1a6e5d:a81080d (svn 192591:192595)
[chromium-blink-merge.git] / ui / aura / input_state_lookup_win.cc
blobf88073ac5ad5be69c0da62e361a89eda34504f50
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "ui/aura/input_state_lookup_win.h"
7 #include <windows.h>
8 #include <winuser.h>
10 namespace aura {
12 // static
13 scoped_ptr<InputStateLookup> InputStateLookup::Create() {
14 return make_scoped_ptr(new InputStateLookupWin);
17 InputStateLookupWin::InputStateLookupWin() {
20 InputStateLookupWin::~InputStateLookupWin() {
23 bool InputStateLookupWin::IsMouseButtonDown() const {
24 return (GetKeyState(VK_LBUTTON) & 0x80) ||
25 (GetKeyState(VK_RBUTTON) & 0x80) ||
26 (GetKeyState(VK_MBUTTON) & 0x80) ||
27 (GetKeyState(VK_XBUTTON1) & 0x80) ||
28 (GetKeyState(VK_XBUTTON2) & 0x80);
31 } // namespace aura