OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 // content before releasing the underlying frame. | 55 // content before releasing the underlying frame. |
56 class DesktopFrameWithCursor : public DesktopFrame { | 56 class DesktopFrameWithCursor : public DesktopFrame { |
57 public: | 57 public: |
58 // Takes ownership of |frame|. | 58 // Takes ownership of |frame|. |
59 DesktopFrameWithCursor(DesktopFrame* frame, | 59 DesktopFrameWithCursor(DesktopFrame* frame, |
60 const MouseCursor& cursor, | 60 const MouseCursor& cursor, |
61 const DesktopVector& position); | 61 const DesktopVector& position); |
62 virtual ~DesktopFrameWithCursor(); | 62 virtual ~DesktopFrameWithCursor(); |
63 | 63 |
64 private: | 64 private: |
65 rtc::scoped_ptr<DesktopFrame> original_frame_; | 65 std::unique_ptr<DesktopFrame> original_frame_; |
66 | 66 |
67 DesktopVector restore_position_; | 67 DesktopVector restore_position_; |
68 rtc::scoped_ptr<DesktopFrame> restore_frame_; | 68 std::unique_ptr<DesktopFrame> restore_frame_; |
69 | 69 |
70 RTC_DISALLOW_COPY_AND_ASSIGN(DesktopFrameWithCursor); | 70 RTC_DISALLOW_COPY_AND_ASSIGN(DesktopFrameWithCursor); |
71 }; | 71 }; |
72 | 72 |
73 DesktopFrameWithCursor::DesktopFrameWithCursor(DesktopFrame* frame, | 73 DesktopFrameWithCursor::DesktopFrameWithCursor(DesktopFrame* frame, |
74 const MouseCursor& cursor, | 74 const MouseCursor& cursor, |
75 const DesktopVector& position) | 75 const DesktopVector& position) |
76 : DesktopFrame(frame->size(), frame->stride(), | 76 : DesktopFrame(frame->size(), frame->stride(), |
77 frame->data(), frame->shared_memory()), | 77 frame->data(), frame->shared_memory()), |
78 original_frame_(frame) { | 78 original_frame_(frame) { |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 } | 166 } |
167 | 167 |
168 void DesktopAndCursorComposer::OnMouseCursorPosition( | 168 void DesktopAndCursorComposer::OnMouseCursorPosition( |
169 MouseCursorMonitor::CursorState state, | 169 MouseCursorMonitor::CursorState state, |
170 const DesktopVector& position) { | 170 const DesktopVector& position) { |
171 cursor_state_ = state; | 171 cursor_state_ = state; |
172 cursor_position_ = position; | 172 cursor_position_ = position; |
173 } | 173 } |
174 | 174 |
175 } // namespace webrtc | 175 } // namespace webrtc |
OLD | NEW |