| 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 <ApplicationServices/ApplicationServices.h> | 7 #include <ApplicationServices/ApplicationServices.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/memory/ptr_util.h" |
| 11 | 12 |
| 12 namespace media { | 13 namespace media { |
| 13 namespace { | 14 namespace { |
| 14 | 15 |
| 15 class UserInputMonitorMac : public UserInputMonitor { | 16 class UserInputMonitorMac : public UserInputMonitor { |
| 16 public: | 17 public: |
| 17 UserInputMonitorMac(); | 18 UserInputMonitorMac(); |
| 18 ~UserInputMonitorMac() override; | 19 ~UserInputMonitorMac() override; |
| 19 | 20 |
| 20 size_t GetKeyPressCount() const override; | 21 size_t GetKeyPressCount() const override; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 44 void UserInputMonitorMac::StopKeyboardMonitoring() {} | 45 void UserInputMonitorMac::StopKeyboardMonitoring() {} |
| 45 | 46 |
| 46 // TODO(jiayl): add the impl. | 47 // TODO(jiayl): add the impl. |
| 47 void UserInputMonitorMac::StartMouseMonitoring() { NOTIMPLEMENTED(); } | 48 void UserInputMonitorMac::StartMouseMonitoring() { NOTIMPLEMENTED(); } |
| 48 | 49 |
| 49 // TODO(jiayl): add the impl. | 50 // TODO(jiayl): add the impl. |
| 50 void UserInputMonitorMac::StopMouseMonitoring() { NOTIMPLEMENTED(); } | 51 void UserInputMonitorMac::StopMouseMonitoring() { NOTIMPLEMENTED(); } |
| 51 | 52 |
| 52 } // namespace | 53 } // namespace |
| 53 | 54 |
| 54 scoped_ptr<UserInputMonitor> UserInputMonitor::Create( | 55 std::unique_ptr<UserInputMonitor> UserInputMonitor::Create( |
| 55 const scoped_refptr<base::SingleThreadTaskRunner>& input_task_runner, | 56 const scoped_refptr<base::SingleThreadTaskRunner>& input_task_runner, |
| 56 const scoped_refptr<base::SingleThreadTaskRunner>& ui_task_runner) { | 57 const scoped_refptr<base::SingleThreadTaskRunner>& ui_task_runner) { |
| 57 return scoped_ptr<UserInputMonitor>(new UserInputMonitorMac()); | 58 return base::WrapUnique(new UserInputMonitorMac); |
| 58 } | 59 } |
| 59 | 60 |
| 60 } // namespace media | 61 } // namespace media |
| OLD | NEW |