| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "remoting/host/mouse_shape_pump.h" | 5 #include "remoting/host/mouse_shape_pump.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 protocol::CursorShapeStub* cursor_shape_stub) | 25 protocol::CursorShapeStub* cursor_shape_stub) |
| 26 : mouse_cursor_monitor_(std::move(mouse_cursor_monitor)), | 26 : mouse_cursor_monitor_(std::move(mouse_cursor_monitor)), |
| 27 cursor_shape_stub_(cursor_shape_stub), | 27 cursor_shape_stub_(cursor_shape_stub), |
| 28 capture_timer_(true, true) { | 28 capture_timer_(true, true) { |
| 29 mouse_cursor_monitor_->Init(this, webrtc::MouseCursorMonitor::SHAPE_ONLY); | 29 mouse_cursor_monitor_->Init(this, webrtc::MouseCursorMonitor::SHAPE_ONLY); |
| 30 capture_timer_.Start( | 30 capture_timer_.Start( |
| 31 FROM_HERE, base::TimeDelta::FromMilliseconds(kCursorCaptureIntervalMs), | 31 FROM_HERE, base::TimeDelta::FromMilliseconds(kCursorCaptureIntervalMs), |
| 32 base::Bind(&MouseShapePump::Capture, base::Unretained(this))); | 32 base::Bind(&MouseShapePump::Capture, base::Unretained(this))); |
| 33 } | 33 } |
| 34 | 34 |
| 35 MouseShapePump::~MouseShapePump() {} | 35 MouseShapePump::~MouseShapePump() { |
| 36 DCHECK(thread_checker_.CalledOnValidThread()); |
| 37 } |
| 36 | 38 |
| 37 void MouseShapePump::Capture() { | 39 void MouseShapePump::Capture() { |
| 38 DCHECK(thread_checker_.CalledOnValidThread()); | 40 DCHECK(thread_checker_.CalledOnValidThread()); |
| 39 | 41 |
| 40 mouse_cursor_monitor_->Capture(); | 42 mouse_cursor_monitor_->Capture(); |
| 41 } | 43 } |
| 42 | 44 |
| 43 void MouseShapePump::OnMouseCursor(webrtc::MouseCursor* cursor) { | 45 void MouseShapePump::OnMouseCursor(webrtc::MouseCursor* cursor) { |
| 44 DCHECK(thread_checker_.CalledOnValidThread()); | 46 DCHECK(thread_checker_.CalledOnValidThread()); |
| 45 | 47 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 66 } | 68 } |
| 67 | 69 |
| 68 void MouseShapePump::OnMouseCursorPosition( | 70 void MouseShapePump::OnMouseCursorPosition( |
| 69 webrtc::MouseCursorMonitor::CursorState state, | 71 webrtc::MouseCursorMonitor::CursorState state, |
| 70 const webrtc::DesktopVector& position) { | 72 const webrtc::DesktopVector& position) { |
| 71 // We're not subscribing to mouse position changes. | 73 // We're not subscribing to mouse position changes. |
| 72 NOTREACHED(); | 74 NOTREACHED(); |
| 73 } | 75 } |
| 74 | 76 |
| 75 } // namespace remoting | 77 } // namespace remoting |
| OLD | NEW |