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

Side by Side Diff: ui/aura/input_state_lookup_win.cc

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « ui/aura/input_state_lookup.cc ('k') | ui/aura/scoped_window_targeter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/aura/input_state_lookup_win.h" 5 #include "ui/aura/input_state_lookup_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <winuser.h> 8 #include <winuser.h>
9 9
10 #include "base/memory/ptr_util.h"
11
10 namespace aura { 12 namespace aura {
11 13
12 // static 14 // static
13 scoped_ptr<InputStateLookup> InputStateLookup::Create() { 15 std::unique_ptr<InputStateLookup> InputStateLookup::Create() {
14 return make_scoped_ptr(new InputStateLookupWin); 16 return base::WrapUnique(new InputStateLookupWin);
15 } 17 }
16 18
17 InputStateLookupWin::InputStateLookupWin() { 19 InputStateLookupWin::InputStateLookupWin() {
18 } 20 }
19 21
20 InputStateLookupWin::~InputStateLookupWin() { 22 InputStateLookupWin::~InputStateLookupWin() {
21 } 23 }
22 24
23 bool InputStateLookupWin::IsMouseButtonDown() const { 25 bool InputStateLookupWin::IsMouseButtonDown() const {
24 return (GetKeyState(VK_LBUTTON) & 0x80) || 26 return (GetKeyState(VK_LBUTTON) & 0x80) ||
25 (GetKeyState(VK_RBUTTON) & 0x80) || 27 (GetKeyState(VK_RBUTTON) & 0x80) ||
26 (GetKeyState(VK_MBUTTON) & 0x80) || 28 (GetKeyState(VK_MBUTTON) & 0x80) ||
27 (GetKeyState(VK_XBUTTON1) & 0x80) || 29 (GetKeyState(VK_XBUTTON1) & 0x80) ||
28 (GetKeyState(VK_XBUTTON2) & 0x80); 30 (GetKeyState(VK_XBUTTON2) & 0x80);
29 } 31 }
30 32
31 } // namespace aura 33 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/input_state_lookup.cc ('k') | ui/aura/scoped_window_targeter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698