| OLD | NEW |
| 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 "media/base/user_input_monitor.h" | 5 #include "media/base/user_input_monitor.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 LRESULT OnInput(HRAWINPUT input_handle); | 53 LRESULT OnInput(HRAWINPUT input_handle); |
| 54 // Handles messages received by |window_|. | 54 // Handles messages received by |window_|. |
| 55 bool HandleMessage(UINT message, | 55 bool HandleMessage(UINT message, |
| 56 WPARAM wparam, | 56 WPARAM wparam, |
| 57 LPARAM lparam, | 57 LPARAM lparam, |
| 58 LRESULT* result); | 58 LRESULT* result); |
| 59 RAWINPUTDEVICE* GetRawInputDevices(EventBitMask event, DWORD flags); | 59 RAWINPUTDEVICE* GetRawInputDevices(EventBitMask event, DWORD flags); |
| 60 | 60 |
| 61 // Task runner on which |window_| is created. | 61 // Task runner on which |window_| is created. |
| 62 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_; | 62 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_; |
| 63 scoped_refptr<ObserverListThreadSafe<UserInputMonitor::MouseEventListener> > | 63 scoped_refptr<base::ObserverListThreadSafe< |
| 64 mouse_listeners_; | 64 UserInputMonitor::MouseEventListener>> mouse_listeners_; |
| 65 | 65 |
| 66 // These members are only accessed on the UI thread. | 66 // These members are only accessed on the UI thread. |
| 67 scoped_ptr<base::win::MessageWindow> window_; | 67 scoped_ptr<base::win::MessageWindow> window_; |
| 68 uint8 events_monitored_; | 68 uint8 events_monitored_; |
| 69 KeyboardEventCounter counter_; | 69 KeyboardEventCounter counter_; |
| 70 | 70 |
| 71 DISALLOW_COPY_AND_ASSIGN(UserInputMonitorWinCore); | 71 DISALLOW_COPY_AND_ASSIGN(UserInputMonitorWinCore); |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 class UserInputMonitorWin : public UserInputMonitor { | 74 class UserInputMonitorWin : public UserInputMonitor { |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 | 308 |
| 309 } // namespace | 309 } // namespace |
| 310 | 310 |
| 311 scoped_ptr<UserInputMonitor> UserInputMonitor::Create( | 311 scoped_ptr<UserInputMonitor> UserInputMonitor::Create( |
| 312 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner, | 312 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner, |
| 313 const scoped_refptr<base::SingleThreadTaskRunner>& ui_task_runner) { | 313 const scoped_refptr<base::SingleThreadTaskRunner>& ui_task_runner) { |
| 314 return scoped_ptr<UserInputMonitor>(new UserInputMonitorWin(ui_task_runner)); | 314 return scoped_ptr<UserInputMonitor>(new UserInputMonitorWin(ui_task_runner)); |
| 315 } | 315 } |
| 316 | 316 |
| 317 } // namespace media | 317 } // namespace media |
| OLD | NEW |