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

Side by Side Diff: content/browser/media/capture/cursor_renderer.h

Issue 1484403002: cast: Support for low-latency interactive mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_BROWSER_MEDIA_CAPTURE_CURSOR_RENDERER_H_ 5 #ifndef CONTENT_BROWSER_MEDIA_CAPTURE_CURSOR_RENDERER_H_
6 #define CONTENT_BROWSER_MEDIA_CAPTURE_CURSOR_RENDERER_H_ 6 #define CONTENT_BROWSER_MEDIA_CAPTURE_CURSOR_RENDERER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 19 matching lines...) Expand all
30 // Takes a snapshot of the current cursor state and determines whether 30 // Takes a snapshot of the current cursor state and determines whether
31 // the cursor will be rendered, which cursor image to render, and at what 31 // the cursor will be rendered, which cursor image to render, and at what
32 // location within |region_in_frame| to render it. Returns true if cursor 32 // location within |region_in_frame| to render it. Returns true if cursor
33 // needs to be rendered. 33 // needs to be rendered.
34 virtual bool SnapshotCursorState(const gfx::Rect& region_in_frame) = 0; 34 virtual bool SnapshotCursorState(const gfx::Rect& region_in_frame) = 0;
35 35
36 // Renders cursor on the |target| video frame. 36 // Renders cursor on the |target| video frame.
37 virtual void RenderOnVideoFrame( 37 virtual void RenderOnVideoFrame(
38 const scoped_refptr<media::VideoFrame>& target) const = 0; 38 const scoped_refptr<media::VideoFrame>& target) const = 0;
39 39
40 // Returns true if UI event was detected.
41 virtual bool ui_event_detected() const = 0;
42
40 // Returns a weak pointer. 43 // Returns a weak pointer.
41 virtual base::WeakPtr<CursorRenderer> GetWeakPtr() = 0; 44 virtual base::WeakPtr<CursorRenderer> GetWeakPtr() = 0;
42 45
43 protected: 46 protected:
44 enum { 47 enum {
45 // Minium movement before cursor is rendered on frame. 48 // Minium movement before cursor is rendered on frame.
46 MIN_MOVEMENT_PIXELS = 15, 49 MIN_MOVEMENT_PIXELS = 15,
47 // Maximum idle time allowed before we stop rendering the cursor 50 // Maximum idle time allowed before we stop rendering the cursor
48 // on frame. 51 // on frame.
49 MAX_IDLE_TIME_SECONDS = 2 52 MAX_IDLE_TIME_SECONDS = 2
50 }; 53 };
51 }; 54 };
52 55
53 } // namespace content 56 } // namespace content
54 57
55 #endif // CONTENT_BROWSER_MEDIA_CAPTURE_CURSOR_RENDERER_H_ 58 #endif // CONTENT_BROWSER_MEDIA_CAPTURE_CURSOR_RENDERER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698