Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(482)

Side by Side Diff: content/renderer/media_capture_from_element/canvas_capture_handler.h

Issue 2846843002: [blink] Unique pointers in Platform.h (Closed)
Patch Set: fix compilation (and again) Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_CAPTURE_FROM_ELEMENT_CANVAS_CAPTURE_HANDLER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_CAPTURE_FROM_ELEMENT_CANVAS_CAPTURE_HANDLER_H_
6 #define CONTENT_RENDERER_MEDIA_CAPTURE_FROM_ELEMENT_CANVAS_CAPTURE_HANDLER_H_ 6 #define CONTENT_RENDERER_MEDIA_CAPTURE_FROM_ELEMENT_CANVAS_CAPTURE_HANDLER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 24 matching lines...) Expand all
35 // is owned by a CanvasCaptureMediaStreamTrack. 35 // is owned by a CanvasCaptureMediaStreamTrack.
36 // All methods are called on the same thread as construction and destruction, 36 // All methods are called on the same thread as construction and destruction,
37 // i.e. the Main Render thread. Note that a CanvasCaptureHandlerDelegate is 37 // i.e. the Main Render thread. Note that a CanvasCaptureHandlerDelegate is
38 // used to send back frames to |io_task_runner_|, i.e. IO thread. 38 // used to send back frames to |io_task_runner_|, i.e. IO thread.
39 class CONTENT_EXPORT CanvasCaptureHandler final 39 class CONTENT_EXPORT CanvasCaptureHandler final
40 : public NON_EXPORTED_BASE(blink::WebCanvasCaptureHandler) { 40 : public NON_EXPORTED_BASE(blink::WebCanvasCaptureHandler) {
41 public: 41 public:
42 ~CanvasCaptureHandler() override; 42 ~CanvasCaptureHandler() override;
43 43
44 // Creates a CanvasCaptureHandler instance and updates UMA histogram. 44 // Creates a CanvasCaptureHandler instance and updates UMA histogram.
45 static CanvasCaptureHandler* CreateCanvasCaptureHandler( 45 static std::unique_ptr<CanvasCaptureHandler> CreateCanvasCaptureHandler(
46 const blink::WebSize& size, 46 const blink::WebSize& size,
47 double frame_rate, 47 double frame_rate,
48 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner, 48 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner,
49 blink::WebMediaStreamTrack* track); 49 blink::WebMediaStreamTrack* track);
50 50
51 // blink::WebCanvasCaptureHandler Implementation. 51 // blink::WebCanvasCaptureHandler Implementation.
52 void SendNewFrame(const SkImage* image) override; 52 void SendNewFrame(const SkImage* image) override;
53 bool NeedsNewFrame() const override; 53 bool NeedsNewFrame() const override;
54 54
55 // Functions called by media::VideoCapturerSource implementation. 55 // Functions called by media::VideoCapturerSource implementation.
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 // Bound to Main Render thread. 100 // Bound to Main Render thread.
101 base::ThreadChecker main_render_thread_checker_; 101 base::ThreadChecker main_render_thread_checker_;
102 base::WeakPtrFactory<CanvasCaptureHandler> weak_ptr_factory_; 102 base::WeakPtrFactory<CanvasCaptureHandler> weak_ptr_factory_;
103 103
104 DISALLOW_COPY_AND_ASSIGN(CanvasCaptureHandler); 104 DISALLOW_COPY_AND_ASSIGN(CanvasCaptureHandler);
105 }; 105 };
106 106
107 } // namespace content 107 } // namespace content
108 108
109 #endif // CONTENT_RENDERER_MEDIA_CAPTURE_FROM_ELEMENT_CANVAS_CAPTURE_HANDLER_H_ 109 #endif // CONTENT_RENDERER_MEDIA_CAPTURE_FROM_ELEMENT_CANVAS_CAPTURE_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698