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

Unified Diff: content/renderer/media/canvas_capture_handler.h

Issue 1686823003: Canvas capture from inactive tab (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/frame_messages.h ('k') | content/renderer/media/canvas_capture_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/canvas_capture_handler.h
diff --git a/content/renderer/media/canvas_capture_handler.h b/content/renderer/media/canvas_capture_handler.h
index c9aa31372d4b90185a702843e51aefbaf7a4ef7a..98aba7a17c7648dd3901fb579a3d6a43d7498d27 100644
--- a/content/renderer/media/canvas_capture_handler.h
+++ b/content/renderer/media/canvas_capture_handler.h
@@ -13,6 +13,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/threading/thread_checker.h"
#include "content/common/content_export.h"
+#include "content/renderer/render_view_impl.h"
#include "media/base/video_capturer_source.h"
#include "media/base/video_frame_pool.h"
#include "third_party/WebKit/public/platform/WebCanvasCaptureHandler.h"
@@ -80,6 +81,8 @@ class CONTENT_EXPORT CanvasCaptureHandler final
// Destroyed on |frame_callback_task_runner_| after the class is destroyed.
class CanvasCaptureHandlerDelegate;
+ RenderViewImpl* render_view_;
+
media::VideoCaptureFormat capture_format_;
bool ask_for_new_frame_;
@@ -90,6 +93,10 @@ class CONTENT_EXPORT CanvasCaptureHandler final
SkImageInfo image_info_;
media::VideoFramePool frame_pool_;
+ // Keeps track of the capture count increment. Safe to use a boolean
+ // since the methods are single threaded.
+ bool capturer_count_incremented_;
+
const scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
scoped_ptr<CanvasCaptureHandlerDelegate> delegate_;
// Bound to the main render thread.
« no previous file with comments | « content/common/frame_messages.h ('k') | content/renderer/media/canvas_capture_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698