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

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

Issue 1162943002: Replace more ObserverList with base::ObserverList. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@observer
Patch Set: Created 5 years, 6 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 | « media/audio/audio_manager_base.cc ('k') | media/base/user_input_monitor_linux.cc » ('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 #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 "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/observer_list_threadsafe.h" 10 #include "base/observer_list_threadsafe.h"
(...skipping 15 matching lines...) Expand all
26 public: 26 public:
27 // The interface to receive mouse movement events. 27 // The interface to receive mouse movement events.
28 class MEDIA_EXPORT MouseEventListener { 28 class MEDIA_EXPORT MouseEventListener {
29 public: 29 public:
30 // |position| is the new mouse position. 30 // |position| is the new mouse position.
31 virtual void OnMouseMoved(const SkIPoint& position) = 0; 31 virtual void OnMouseMoved(const SkIPoint& position) = 0;
32 32
33 protected: 33 protected:
34 virtual ~MouseEventListener() {} 34 virtual ~MouseEventListener() {}
35 }; 35 };
36 typedef ObserverListThreadSafe<UserInputMonitor::MouseEventListener> 36 typedef base::ObserverListThreadSafe<UserInputMonitor::MouseEventListener>
37 MouseListenerList; 37 MouseListenerList;
38 38
39 UserInputMonitor(); 39 UserInputMonitor();
40 virtual ~UserInputMonitor(); 40 virtual ~UserInputMonitor();
41 41
42 // Creates a platform-specific instance of UserInputMonitor. 42 // Creates a platform-specific instance of UserInputMonitor.
43 // |io_task_runner| is the task runner for an IO thread. 43 // |io_task_runner| is the task runner for an IO thread.
44 // |ui_task_runner| is the task runner for a UI thread. 44 // |ui_task_runner| is the task runner for a UI thread.
45 static scoped_ptr<UserInputMonitor> Create( 45 static scoped_ptr<UserInputMonitor> Create(
46 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner, 46 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner,
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 size_t key_press_counter_references_; 80 size_t key_press_counter_references_;
81 size_t mouse_listeners_count_; 81 size_t mouse_listeners_count_;
82 scoped_refptr<MouseListenerList> mouse_listeners_; 82 scoped_refptr<MouseListenerList> mouse_listeners_;
83 83
84 DISALLOW_COPY_AND_ASSIGN(UserInputMonitor); 84 DISALLOW_COPY_AND_ASSIGN(UserInputMonitor);
85 }; 85 };
86 86
87 } // namespace media 87 } // namespace media
88 88
89 #endif // MEDIA_BASE_USER_INPUT_MONITOR_H_ 89 #endif // MEDIA_BASE_USER_INPUT_MONITOR_H_
OLDNEW
« no previous file with comments | « media/audio/audio_manager_base.cc ('k') | media/base/user_input_monitor_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698