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

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

Issue 2682743006: Add unittests for CursorRendererMac (Closed)
Patch Set: address comments Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/media/capture/cursor_renderer_mac.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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_
OLDNEW
« no previous file with comments | « no previous file | content/browser/media/capture/cursor_renderer_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698