OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef REMOTING_HOST_IPC_VIDEO_FRAME_CAPTURER_H_ | 5 #ifndef REMOTING_HOST_IPC_VIDEO_FRAME_CAPTURER_H_ |
6 #define REMOTING_HOST_IPC_VIDEO_FRAME_CAPTURER_H_ | 6 #define REMOTING_HOST_IPC_VIDEO_FRAME_CAPTURER_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "remoting/capturer/video_frame_capturer.h" | 9 #include "remoting/capturer/video_frame_capturer.h" |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 public: | 23 public: |
24 explicit IpcVideoFrameCapturer( | 24 explicit IpcVideoFrameCapturer( |
25 scoped_refptr<DesktopSessionProxy> desktop_session_proxy); | 25 scoped_refptr<DesktopSessionProxy> desktop_session_proxy); |
26 virtual ~IpcVideoFrameCapturer(); | 26 virtual ~IpcVideoFrameCapturer(); |
27 | 27 |
28 // VideoFrameCapturer interface. | 28 // VideoFrameCapturer interface. |
29 virtual void Start(Delegate* delegate) OVERRIDE; | 29 virtual void Start(Delegate* delegate) OVERRIDE; |
30 virtual void Stop() OVERRIDE; | 30 virtual void Stop() OVERRIDE; |
31 virtual void InvalidateRegion(const SkRegion& invalid_region) OVERRIDE; | 31 virtual void InvalidateRegion(const SkRegion& invalid_region) OVERRIDE; |
32 virtual void CaptureFrame() OVERRIDE; | 32 virtual void CaptureFrame() OVERRIDE; |
33 virtual const SkISize& size_most_recent() const OVERRIDE; | |
34 | 33 |
35 // Called when a video frame has been captured. |capture_data| describes | 34 // Called when a video frame has been captured. |capture_data| describes |
36 // a captured frame. | 35 // a captured frame. |
37 void OnCaptureCompleted(scoped_refptr<CaptureData> capture_data); | 36 void OnCaptureCompleted(scoped_refptr<CaptureData> capture_data); |
38 | 37 |
39 // Called when the cursor shape has changed. | 38 // Called when the cursor shape has changed. |
40 void OnCursorShapeChanged(scoped_ptr<MouseCursorShape> cursor_shape); | 39 void OnCursorShapeChanged(scoped_ptr<MouseCursorShape> cursor_shape); |
41 | 40 |
42 private: | 41 private: |
43 // Points to the delegate passed to VideoFrameCapturer::Start(). | 42 // Points to the delegate passed to VideoFrameCapturer::Start(). |
44 VideoFrameCapturer::Delegate* delegate_; | 43 VideoFrameCapturer::Delegate* delegate_; |
45 | 44 |
46 // Wraps the IPC channel to the desktop session agent. | 45 // Wraps the IPC channel to the desktop session agent. |
47 scoped_refptr<DesktopSessionProxy> desktop_session_proxy_; | 46 scoped_refptr<DesktopSessionProxy> desktop_session_proxy_; |
48 | 47 |
49 // Size of the most recent captured frame. | |
50 SkISize size_most_recent_; | |
51 | |
52 DISALLOW_COPY_AND_ASSIGN(IpcVideoFrameCapturer); | 48 DISALLOW_COPY_AND_ASSIGN(IpcVideoFrameCapturer); |
53 }; | 49 }; |
54 | 50 |
55 } // namespace remoting | 51 } // namespace remoting |
56 | 52 |
57 #endif // REMOTING_HOST_IPC_VIDEO_FRAME_CAPTURER_H_ | 53 #endif // REMOTING_HOST_IPC_VIDEO_FRAME_CAPTURER_H_ |
OLD | NEW |