| OLD | NEW |
| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 | 78 |
| 79 // Returns the image of the last-known mouse cursor and its hotspot. | 79 // Returns the image of the last-known mouse cursor and its hotspot. |
| 80 virtual SkBitmap GetLastKnownCursorImage(gfx::Point* hot_point) = 0; | 80 virtual SkBitmap GetLastKnownCursorImage(gfx::Point* hot_point) = 0; |
| 81 | 81 |
| 82 // Called by subclasses to report mouse events within the captured view. | 82 // Called by subclasses to report mouse events within the captured view. |
| 83 void OnMouseMoved(const gfx::Point& location, base::TimeTicks timestamp); | 83 void OnMouseMoved(const gfx::Point& location, base::TimeTicks timestamp); |
| 84 void OnMouseClicked(const gfx::Point& location, base::TimeTicks timestamp); | 84 void OnMouseClicked(const gfx::Point& location, base::TimeTicks timestamp); |
| 85 | 85 |
| 86 private: | 86 private: |
| 87 friend class CursorRendererAuraTest; | 87 friend class CursorRendererAuraTest; |
| 88 friend class CursorRendererMacTest; |
| 88 | 89 |
| 89 const gfx::NativeView captured_view_; | 90 const gfx::NativeView captured_view_; |
| 90 | 91 |
| 91 // Snapshot of cursor, source size, scale, position, and cursor bitmap; | 92 // Snapshot of cursor, source size, scale, position, and cursor bitmap; |
| 92 // as of the last call to SnapshotCursorState. | 93 // as of the last call to SnapshotCursorState. |
| 93 float last_x_scale_; | 94 float last_x_scale_; |
| 94 float last_y_scale_; | 95 float last_y_scale_; |
| 95 gfx::NativeCursor last_cursor_; | 96 gfx::NativeCursor last_cursor_; |
| 96 gfx::Point cursor_position_in_frame_; | 97 gfx::Point cursor_position_in_frame_; |
| 97 gfx::Point last_cursor_hot_point_; | 98 gfx::Point last_cursor_hot_point_; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 112 base::TickClock* tick_clock_; | 113 base::TickClock* tick_clock_; |
| 113 | 114 |
| 114 base::WeakPtrFactory<CursorRenderer> weak_factory_; | 115 base::WeakPtrFactory<CursorRenderer> weak_factory_; |
| 115 | 116 |
| 116 DISALLOW_COPY_AND_ASSIGN(CursorRenderer); | 117 DISALLOW_COPY_AND_ASSIGN(CursorRenderer); |
| 117 }; | 118 }; |
| 118 | 119 |
| 119 } // namespace content | 120 } // namespace content |
| 120 | 121 |
| 121 #endif // CONTENT_BROWSER_MEDIA_CAPTURE_CURSOR_RENDERER_H_ | 122 #endif // CONTENT_BROWSER_MEDIA_CAPTURE_CURSOR_RENDERER_H_ |
| OLD | NEW |