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

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

Issue 1412173003: cast: support cursor rendering for tab capture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable cursor rendering on windows until resources are available Created 5 years, 1 month 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/browser/media/capture/DEPS ('k') | content/browser/media/capture/aura_window_capture_machine.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/media/capture/aura_window_capture_machine.h
diff --git a/content/browser/media/capture/aura_window_capture_machine.h b/content/browser/media/capture/aura_window_capture_machine.h
index 858c71422708ad172dc41c0e4799737ce8605c9f..8407e94f69c23dbc9b86ae8cc8330809cb3392c6 100644
--- a/content/browser/media/capture/aura_window_capture_machine.h
+++ b/content/browser/media/capture/aura_window_capture_machine.h
@@ -8,6 +8,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/timer/timer.h"
+#include "content/browser/media/capture/cursor_renderer_aura.h"
#include "media/capture/content/screen_capture_device_core.h"
#include "ui/aura/window.h"
#include "ui/aura/window_observer.h"
@@ -91,14 +92,14 @@ class AuraWindowCaptureMachine
const CaptureFrameCallback& capture_frame_cb,
scoped_ptr<cc::CopyOutputResult> result);
- // Helper function to update cursor state.
- // |region_in_frame| defines where the desktop is rendered in the captured
- // frame.
- // Returns the current cursor position in captured frame.
- gfx::Point UpdateCursorState(const gfx::Rect& region_in_frame);
-
- // Clears cursor state.
- void ClearCursorState();
+ // Renders the cursor if needed and then delivers the captured frame.
+ static void CopyOutputFinishedForVideo(
+ base::WeakPtr<AuraWindowCaptureMachine> machine,
+ base::TimeTicks start_time,
+ const CaptureFrameCallback& capture_frame_cb,
+ const scoped_refptr<media::VideoFrame>& target,
+ scoped_ptr<cc::SingleReleaseCallback> release_callback,
+ bool result);
// The window associated with the desktop.
aura::Window* desktop_window_;
@@ -118,10 +119,8 @@ class AuraWindowCaptureMachine
// YUV readback pipeline.
scoped_ptr<content::ReadbackYUVInterface> yuv_readback_pipeline_;
- // Cursor state.
- ui::Cursor last_cursor_;
- gfx::Size window_size_when_cursor_last_updated_;
- SkBitmap scaled_cursor_bitmap_;
+ // Renders mouse cursor on frame.
+ scoped_ptr<content::CursorRendererAura> cursor_renderer_;
// TODO(jiayl): Remove power_save_blocker_ when there is an API to keep the
// screen from sleeping for the drive-by web.
« no previous file with comments | « content/browser/media/capture/DEPS ('k') | content/browser/media/capture/aura_window_capture_machine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698