| Index: remoting/client/gl_cursor_feedback.h
|
| diff --git a/remoting/client/gl_cursor_feedback.h b/remoting/client/gl_cursor_feedback.h
|
| index 6405efcee7dc4c92be956b0d89bbda5c8271ad7b..64d35d78c4d0b69cc869bc4005e4fed554b8dfbe 100644
|
| --- a/remoting/client/gl_cursor_feedback.h
|
| +++ b/remoting/client/gl_cursor_feedback.h
|
| @@ -10,7 +10,9 @@
|
| #include <memory>
|
|
|
| #include "base/macros.h"
|
| +#include "base/memory/weak_ptr.h"
|
| #include "base/time/time.h"
|
| +#include "remoting/client/gl_drawable.h"
|
|
|
| namespace remoting {
|
|
|
| @@ -18,21 +20,23 @@ class GlCanvas;
|
| class GlRenderLayer;
|
|
|
| // This class draws the cursor feedback on the canvas.
|
| -class GlCursorFeedback {
|
| +class GlCursorFeedback : public GlDrawable {
|
| public:
|
| GlCursorFeedback();
|
| - ~GlCursorFeedback();
|
| + ~GlCursorFeedback() override;
|
|
|
| // Sets the canvas on which the cursor feedback will be drawn. Resumes the
|
| // feedback texture to the context of the new canvas.
|
| // If |canvas| is nullptr, nothing will happen when calling Draw().
|
| - void SetCanvas(GlCanvas* canvas);
|
| + void SetCanvas(GlCanvas* canvas) override;
|
|
|
| void StartAnimation(float x, float y, float diameter);
|
|
|
| // Returns true if animation is not finished, false otherwise. Does nothing
|
| // if the animation has stopped.
|
| - bool Draw();
|
| + bool Draw() override;
|
| +
|
| + base::WeakPtr<GlDrawable> GetWeakPtr() override;
|
|
|
| private:
|
| std::unique_ptr<GlRenderLayer> layer_;
|
| @@ -41,6 +45,7 @@ class GlCursorFeedback {
|
| float cursor_y_ = 0;
|
| base::TimeTicks animation_start_time_;
|
|
|
| + base::WeakPtrFactory<GlDrawable> weak_factory_;
|
| DISALLOW_COPY_AND_ASSIGN(GlCursorFeedback);
|
| };
|
|
|
|
|