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 #ifndef CONTENT_RENDERER_MEDIA_CANVAS_CAPTURE_HANDLER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_CANVAS_CAPTURE_HANDLER_H_ |
6 #define CONTENT_RENDERER_MEDIA_CANVAS_CAPTURE_HANDLER_H_ | 6 #define CONTENT_RENDERER_MEDIA_CANVAS_CAPTURE_HANDLER_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 // Functions called by media::VideoCapturerSource implementation. | 34 // Functions called by media::VideoCapturerSource implementation. |
35 void StartVideoCapture( | 35 void StartVideoCapture( |
36 const media::VideoCaptureParams& params, | 36 const media::VideoCaptureParams& params, |
37 const media::VideoCapturerSource::VideoCaptureDeliverFrameCB& | 37 const media::VideoCapturerSource::VideoCaptureDeliverFrameCB& |
38 new_frame_callback, | 38 new_frame_callback, |
39 const media::VideoCapturerSource::RunningCallback& running_callback); | 39 const media::VideoCapturerSource::RunningCallback& running_callback); |
40 void StopVideoCapture(); | 40 void StopVideoCapture(); |
41 blink::WebSize GetSourceSize() const { return size_; } | 41 blink::WebSize GetSourceSize() const { return size_; } |
42 | 42 |
43 private: | 43 private: |
44 virtual ~CanvasCaptureHandler(); | 44 ~CanvasCaptureHandler() override; |
45 | 45 |
46 void CreateNewFrame(const blink::WebSkImage& image); | 46 void CreateNewFrame(const blink::WebSkImage& image); |
47 | 47 |
48 // Implementation VideoCapturerSource that is owned by blink and delegates | 48 // Implementation VideoCapturerSource that is owned by blink and delegates |
49 // the Start/Stop calls to CanvasCaptureHandler. | 49 // the Start/Stop calls to CanvasCaptureHandler. |
50 class VideoCapturerSource; | 50 class VideoCapturerSource; |
51 // Object that does all the work of running |new_frame_callback_|. | 51 // Object that does all the work of running |new_frame_callback_|. |
52 // Destroyed on |io_task_runner_| after the class is destroyed. | 52 // Destroyed on |io_task_runner_| after the class is destroyed. |
53 class CanvasCaptureHandlerDelegate; | 53 class CanvasCaptureHandlerDelegate; |
54 | 54 |
(...skipping 12 matching lines...) Expand all Loading... |
67 // Bound to the main render thread. | 67 // Bound to the main render thread. |
68 base::ThreadChecker thread_checker_; | 68 base::ThreadChecker thread_checker_; |
69 base::WeakPtrFactory<CanvasCaptureHandler> weak_ptr_factory_; | 69 base::WeakPtrFactory<CanvasCaptureHandler> weak_ptr_factory_; |
70 | 70 |
71 DISALLOW_COPY_AND_ASSIGN(CanvasCaptureHandler); | 71 DISALLOW_COPY_AND_ASSIGN(CanvasCaptureHandler); |
72 }; | 72 }; |
73 | 73 |
74 } // namespace content | 74 } // namespace content |
75 | 75 |
76 #endif // CONTENT_RENDERER_MEDIA_CANVAS_CAPTURE_HANDLER_H_ | 76 #endif // CONTENT_RENDERER_MEDIA_CANVAS_CAPTURE_HANDLER_H_ |
OLD | NEW |