| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/fake_mouse_cursor_monitor.h" | 5 #include "remoting/host/fake_mouse_cursor_monitor.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" | 9 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" |
| 10 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" | 10 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" |
| 11 #include "third_party/webrtc/modules/desktop_capture/mouse_cursor.h" | 11 #include "third_party/webrtc/modules/desktop_capture/mouse_cursor.h" |
| 12 | 12 |
| 13 namespace remoting { | 13 namespace remoting { |
| 14 | 14 |
| 15 FakeMouseCursorMonitor::FakeMouseCursorMonitor() : callback_(NULL) {} | 15 FakeMouseCursorMonitor::FakeMouseCursorMonitor() : callback_(nullptr) {} |
| 16 | 16 |
| 17 FakeMouseCursorMonitor::~FakeMouseCursorMonitor() {} | 17 FakeMouseCursorMonitor::~FakeMouseCursorMonitor() {} |
| 18 | 18 |
| 19 void FakeMouseCursorMonitor::Init( | 19 void FakeMouseCursorMonitor::Init( |
| 20 webrtc::MouseCursorMonitor::Callback* callback, | 20 webrtc::MouseCursorMonitor::Callback* callback, |
| 21 webrtc::MouseCursorMonitor::Mode mode) { | 21 webrtc::MouseCursorMonitor::Mode mode) { |
| 22 DCHECK(!callback_); | 22 DCHECK(!callback_); |
| 23 DCHECK(callback); | 23 DCHECK(callback); |
| 24 | 24 |
| 25 // Only shapes supported right now. | 25 // Only shapes supported right now. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 40 webrtc::DesktopFrame::kBytesPerPixel * kWidth * kHeight); | 40 webrtc::DesktopFrame::kBytesPerPixel * kWidth * kHeight); |
| 41 | 41 |
| 42 scoped_ptr<webrtc::MouseCursor> mouse_cursor( | 42 scoped_ptr<webrtc::MouseCursor> mouse_cursor( |
| 43 new webrtc::MouseCursor(desktop_frame.release(), | 43 new webrtc::MouseCursor(desktop_frame.release(), |
| 44 webrtc::DesktopVector())); | 44 webrtc::DesktopVector())); |
| 45 | 45 |
| 46 callback_->OnMouseCursor(mouse_cursor.release()); | 46 callback_->OnMouseCursor(mouse_cursor.release()); |
| 47 } | 47 } |
| 48 | 48 |
| 49 } // namespace remoting | 49 } // namespace remoting |
| OLD | NEW |