Chromium Code Reviews| Index: remoting/client/display/gl_cursor.h |
| diff --git a/remoting/client/display/gl_cursor.h b/remoting/client/display/gl_cursor.h |
| index eec03e84dad274886f275e64abaebab84265f359..4ddf9643cb7ff54de04dba7cf96d15d73d63933e 100644 |
| --- a/remoting/client/display/gl_cursor.h |
| +++ b/remoting/client/display/gl_cursor.h |
| @@ -10,6 +10,8 @@ |
| #include <memory> |
| #include "base/macros.h" |
| +#include "base/memory/weak_ptr.h" |
| +#include "remoting/client/display/drawable.h" |
| namespace remoting { |
| @@ -17,14 +19,14 @@ namespace protocol { |
| class CursorShapeInfo; |
| } // namespace protocol |
| -class GlCanvas; |
| +class Canvas; |
| class GlRenderLayer; |
| // This class draws the cursor on the canvas. |
| -class GlCursor { |
| +class GlCursor : public Drawable { |
| public: |
| GlCursor(); |
| - ~GlCursor(); |
| + ~GlCursor() override; |
| void SetCursorShape(const protocol::CursorShapeInfo& cursor_shape); |
| @@ -38,9 +40,10 @@ class GlCursor { |
| // Sets the canvas on which the cursor will be drawn. Resumes the current |
| // state of the cursor to the context of the new canvas. |
| // If |canvas| is nullptr, nothing will happen when calling Draw(). |
| - void SetCanvas(GlCanvas* canvas); |
| + void SetCanvas(Canvas* canvas) override; |
|
joedow
2017/01/10 00:19:44
smoosh the overrides together, remove the duplicat
nicholss
2017/01/10 21:43:10
Done.
|
| - void Draw(); |
| + bool Draw() override; |
| + base::WeakPtr<Drawable> GetWeakPtr() override; |
| private: |
| void SetCurrentCursorShape(bool size_changed); |
| @@ -59,6 +62,8 @@ class GlCursor { |
| float cursor_x_ = 0; |
| float cursor_y_ = 0; |
| + base::WeakPtrFactory<Drawable> weak_factory_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(GlCursor); |
| }; |