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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | media/base/user_input_monitor.cc » ('j') | media/base/user_input_monitor_mac.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/user_input_monitor.h
diff --git a/media/base/user_input_monitor.h b/media/base/user_input_monitor.h
index 9eb82f334f833612a0720367c83c4513ba275bef..d3854640c497cb5c5733b3f7021ac54441ae0f64 100644
--- a/media/base/user_input_monitor.h
+++ b/media/base/user_input_monitor.h
@@ -9,7 +9,6 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
-#include "base/memory/weak_ptr.h"
#include "base/observer_list.h"
#include "base/synchronization/lock.h"
#include "media/base/media_export.h"
@@ -28,6 +27,8 @@ namespace media {
// Thread safe. The thread on which the listenters are called is not guaranteed.
// The callers should not perform expensive/blocking tasks in the callback since
// it might be called on the browser UI/IO threads.
+// The object must outlive the browser UI/IO threads to make sure the callbacks
+// will not access deleted object.
class MEDIA_EXPORT UserInputMonitor {
public:
// The interface to receive mouse movement events.
@@ -89,7 +90,7 @@ class MEDIA_EXPORT UserInputMonitor {
bool monitoring_keyboard_;
// The set of keys currently held down. Used for convering raw keyboard events
// into KeyStrokeListener callbacks.
- std::set<ui::KeyboardCode> pressed_keys_;
+ std::set<int> pressed_keys_;
DISALLOW_COPY_AND_ASSIGN(UserInputMonitor);
};
« no previous file with comments | « no previous file | media/base/user_input_monitor.cc » ('j') | media/base/user_input_monitor_mac.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698