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

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

Issue 1864813002: Tab/Desktop Capture: Use requests instead of timer-based refreshing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@video_refresh_from_sinks
Patch Set: Addressed comments from PS2, and sampling decision logic change w.r.t. recent animation. Created 4 years, 8 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/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 c07c72f8c8cac3c1c4a507d83baf81758374475a..6f206afe37ade0c70bcde0e5c0dbdc287ee28b16 100644
--- a/content/browser/media/capture/aura_window_capture_machine.h
+++ b/content/browser/media/capture/aura_window_capture_machine.h
@@ -8,7 +8,6 @@
#include "base/macros.h"
#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"
@@ -40,6 +39,7 @@ class AuraWindowCaptureMachine
const media::VideoCaptureParams& params,
const base::Callback<void(bool)> callback) override;
void Stop(const base::Closure& callback) override;
+ void MaybeCaptureForRefresh() override;
// Implements aura::WindowObserver.
void OnWindowBoundsChanged(aura::Window* window,
@@ -69,7 +69,7 @@ class AuraWindowCaptureMachine
void InternalStop(const base::Closure& callback);
// Captures a frame.
- // |dirty| is false for timer polls and true for compositor updates.
+ // |dirty| is false for refresh requests and true for compositor updates.
void Capture(bool dirty);
// Update capture size. Must be called on the UI thread.
@@ -105,9 +105,6 @@ class AuraWindowCaptureMachine
// The window associated with the desktop.
aura::Window* desktop_window_;
- // The timer that kicks off period captures.
- base::Timer timer_;
-
// Whether screen capturing or window capture.
bool screen_capture_;

Powered by Google App Engine
This is Rietveld 408576698