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

Unified Diff: content/browser/media/capture/cursor_renderer.h

Issue 1412173003: cast: support cursor rendering for tab capture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing cursor renderer files in repo Created 5 years, 2 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
Index: content/browser/media/capture/cursor_renderer.h
diff --git a/content/browser/media/capture/cursor_renderer.h b/content/browser/media/capture/cursor_renderer.h
new file mode 100644
index 0000000000000000000000000000000000000000..ffac46a767c8c8e475a528a6889cd94983e42208
--- /dev/null
+++ b/content/browser/media/capture/cursor_renderer.h
@@ -0,0 +1,35 @@
+// Copyright (c) 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_BROWSER_MEDIA_CAPTURE_CURSOR_RENDERER_H_
+#define CONTENT_BROWSER_MEDIA_CAPTURE_CURSOR_RENDERER_H_
+
+#include "base/macros.h"
+#include "base/memory/ref_counted.h"
+#include "base/memory/weak_ptr.h"
+#include "content/common/content_export.h"
+#include "media/base/video_frame.h"
+#include "ui/gfx/native_widget_types.h"
+
+namespace content {
+
+// CursorRenderer is an interface that can be implememented to do cursor
+// rendering on a video frame
miu 2015/10/23 01:55:12 style nit: Add period at end of sentence. It's wo
Irfan 2015/10/26 23:10:31 Done.
+class CONTENT_EXPORT CursorRenderer {
+ public:
+ virtual ~CursorRenderer() {}
+
+ virtual void Clear() = 0;
miu 2015/10/23 01:55:12 Please document all methods (what they do and/or w
Irfan 2015/10/26 23:10:31 Done.
+
+ virtual bool Update(const gfx::Rect& region_in_frame) = 0;
miu 2015/10/23 01:55:12 naming consideration: SnapshotCursorState(), or so
miu 2015/10/23 01:55:12 Please document. Something like: "Determines whet
Irfan 2015/10/26 23:10:31 Done.
Irfan 2015/10/26 23:10:31 Done.
+
+ virtual void RenderOnVideoFrame(
+ const scoped_refptr<media::VideoFrame>& target) const = 0;
+
+ virtual base::WeakPtr<CursorRenderer> GetWeakPtr() = 0;
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_MEDIA_CAPTURE_CURSOR_RENDERER_H_

Powered by Google App Engine
This is Rietveld 408576698