| Index: content/browser/media/capture/cursor_renderer_aura.h
|
| diff --git a/content/browser/media/capture/cursor_renderer_aura.h b/content/browser/media/capture/cursor_renderer_aura.h
|
| index 19019cf50accafcdabe62adfdf6de9f15ade63d1..21e1996a1ea7c3094cc98aad2a8cb4506a156a89 100644
|
| --- a/content/browser/media/capture/cursor_renderer_aura.h
|
| +++ b/content/browser/media/capture/cursor_renderer_aura.h
|
| @@ -5,33 +5,12 @@
|
| #ifndef CONTENT_BROWSER_MEDIA_CAPTURE_CURSOR_RENDERER_AURA_H_
|
| #define CONTENT_BROWSER_MEDIA_CAPTURE_CURSOR_RENDERER_AURA_H_
|
|
|
| -#include "base/macros.h"
|
| -#include "base/memory/ref_counted.h"
|
| -#include "base/memory/weak_ptr.h"
|
| -#include "base/time/default_tick_clock.h"
|
| -#include "base/time/tick_clock.h"
|
| #include "content/browser/media/capture/cursor_renderer.h"
|
| -#include "content/common/content_export.h"
|
| -#include "media/base/video_frame.h"
|
| -#include "third_party/skia/include/core/SkBitmap.h"
|
| #include "ui/aura/window.h"
|
| -#include "ui/base/cursor/cursor.h"
|
| #include "ui/events/event_handler.h"
|
| -#include "ui/gfx/geometry/point.h"
|
| -#include "ui/gfx/geometry/rect.h"
|
| -#include "ui/gfx/geometry/size.h"
|
|
|
| namespace content {
|
|
|
| -// Setting to control cursor display based on either mouse movement or always
|
| -// forced to be enabled.
|
| -enum CursorDisplaySetting {
|
| - kCursorAlwaysEnabled,
|
| - kCursorEnabledOnMouseMovement
|
| -};
|
| -
|
| -// Tracks state for making decisions on cursor display on a captured video
|
| -// frame.
|
| class CONTENT_EXPORT CursorRendererAura : public CursorRenderer,
|
| public ui::EventHandler,
|
| public aura::WindowObserver {
|
| @@ -41,11 +20,11 @@ class CONTENT_EXPORT CursorRendererAura : public CursorRenderer,
|
| ~CursorRendererAura() final;
|
|
|
| // CursorRender implementation.
|
| - void Clear() final;
|
| - bool SnapshotCursorState(const gfx::Rect& region_in_frame) final;
|
| - void RenderOnVideoFrame(
|
| - const scoped_refptr<media::VideoFrame>& target) const final;
|
| - base::WeakPtr<CursorRenderer> GetWeakPtr() final;
|
| + bool IsCapturedViewActive() final;
|
| + gfx::Size GetCapturedViewSize() final;
|
| + gfx::Point GetCursorPositionInView() final;
|
| + gfx::NativeCursor GetLastKnownCursor() final;
|
| + SkBitmap GetLastKnownCursorImage(gfx::Point* hot_point) final;
|
|
|
| // ui::EventHandler overrides.
|
| void OnMouseEvent(ui::MouseEvent* event) final;
|
| @@ -54,33 +33,8 @@ class CONTENT_EXPORT CursorRendererAura : public CursorRenderer,
|
| void OnWindowDestroying(aura::Window* window) final;
|
|
|
| private:
|
| - friend class CursorRendererAuraTest;
|
| -
|
| aura::Window* window_;
|
|
|
| - // Snapshot of cursor, source size, position, and cursor bitmap; as of the
|
| - // last call to SnapshotCursorState.
|
| - ui::Cursor last_cursor_;
|
| - gfx::Size window_size_when_cursor_last_updated_;
|
| - gfx::Point cursor_position_in_frame_;
|
| - SkBitmap scaled_cursor_bitmap_;
|
| -
|
| - // Updated in mouse event listener and used to make a decision on
|
| - // when the cursor is rendered.
|
| - base::TimeTicks last_mouse_movement_timestamp_;
|
| - float last_mouse_position_x_;
|
| - float last_mouse_position_y_;
|
| - bool cursor_displayed_;
|
| -
|
| - // Controls whether cursor is displayed based on active mouse movement.
|
| - const CursorDisplaySetting cursor_display_setting_;
|
| -
|
| - // Allows tests to replace the clock.
|
| - base::DefaultTickClock default_tick_clock_;
|
| - base::TickClock* tick_clock_;
|
| -
|
| - base::WeakPtrFactory<CursorRendererAura> weak_factory_;
|
| -
|
| DISALLOW_COPY_AND_ASSIGN(CursorRendererAura);
|
| };
|
|
|
|
|