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

Side by Side Diff: media/base/user_input_monitor.h

Issue 22801007: Adds the UserInputMonitor implementation for Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 4 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
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 #ifndef MEDIA_BASE_USER_INPUT_MONITOR_H_ 5 #ifndef MEDIA_BASE_USER_INPUT_MONITOR_H_
6 #define MEDIA_BASE_USER_INPUT_MONITOR_H_ 6 #define MEDIA_BASE_USER_INPUT_MONITOR_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/weak_ptr.h"
13 #include "base/observer_list.h" 12 #include "base/observer_list.h"
14 #include "base/synchronization/lock.h" 13 #include "base/synchronization/lock.h"
15 #include "media/base/media_export.h" 14 #include "media/base/media_export.h"
16 #include "ui/base/events/event_constants.h" 15 #include "ui/base/events/event_constants.h"
17 #include "ui/base/keycodes/keyboard_codes.h" 16 #include "ui/base/keycodes/keyboard_codes.h"
18 17
19 struct SkIPoint; 18 struct SkIPoint;
20 19
21 namespace base { 20 namespace base {
22 class SingleThreadTaskRunner; 21 class SingleThreadTaskRunner;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 virtual void StartKeyboardMonitoring() = 0; 81 virtual void StartKeyboardMonitoring() = 0;
83 virtual void StopKeyboardMonitoring() = 0; 82 virtual void StopKeyboardMonitoring() = 0;
84 83
85 base::Lock lock_; 84 base::Lock lock_;
86 ObserverList<MouseEventListener, true> mouse_listeners_; 85 ObserverList<MouseEventListener, true> mouse_listeners_;
87 ObserverList<KeyStrokeListener, true> key_stroke_listeners_; 86 ObserverList<KeyStrokeListener, true> key_stroke_listeners_;
88 bool monitoring_mouse_; 87 bool monitoring_mouse_;
89 bool monitoring_keyboard_; 88 bool monitoring_keyboard_;
90 // The set of keys currently held down. Used for convering raw keyboard events 89 // The set of keys currently held down. Used for convering raw keyboard events
91 // into KeyStrokeListener callbacks. 90 // into KeyStrokeListener callbacks.
92 std::set<ui::KeyboardCode> pressed_keys_; 91 std::set<int> pressed_keys_;
93 92
94 DISALLOW_COPY_AND_ASSIGN(UserInputMonitor); 93 DISALLOW_COPY_AND_ASSIGN(UserInputMonitor);
95 }; 94 };
96 95
97 } // namespace media 96 } // namespace media
98 97
99 #endif // MEDIA_BASE_USER_INPUT_MONITOR_H_ 98 #endif // MEDIA_BASE_USER_INPUT_MONITOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698