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..55c4ac5bc5c45d56d4663f656d8eb4672f358baf 100644 |
--- a/content/browser/media/capture/cursor_renderer_aura.h |
+++ b/content/browser/media/capture/cursor_renderer_aura.h |
@@ -5,31 +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 |
miu
2016/12/27 23:21:03
This class comment is incomplete. However, all the
braveyao
2017/01/04 01:57:49
Done.
|
// frame. |
class CONTENT_EXPORT CursorRendererAura : public CursorRenderer, |
@@ -41,11 +22,12 @@ 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; |
+ gfx::Point GetLastKnownCursorHotPoint() final; |
+ SkBitmap GetLastKnownCursorImage() final; |
// ui::EventHandler overrides. |
void OnMouseEvent(ui::MouseEvent* event) final; |
@@ -54,33 +36,12 @@ 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_; |
+ gfx::Point last_cursor_hot_point_; |
miu
2016/12/27 23:21:03
You can remove this member (see comments in .cc fi
braveyao
2017/01/04 01:57:49
Done.
|
// Controls whether cursor is displayed based on active mouse movement. |
const CursorDisplaySetting cursor_display_setting_; |
miu
2016/12/27 23:21:03
ditto: You can remove this member too.
braveyao
2017/01/04 01:57:49
Done.
|
- // 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); |
}; |