| Index: remoting/client/display/gl_cursor_feedback.h
|
| diff --git a/remoting/client/display/gl_cursor_feedback.h b/remoting/client/display/gl_cursor_feedback.h
|
| index 230b5239e3568e027b3851237e8cab2a78e845eb..70876e803007799b0d38af27c3d7e8a36ecccc54 100644
|
| --- a/remoting/client/display/gl_cursor_feedback.h
|
| +++ b/remoting/client/display/gl_cursor_feedback.h
|
| @@ -5,34 +5,34 @@
|
| #ifndef REMOTING_CLIENT_DISPLAY_GL_CURSOR_FEEDBACK_H_
|
| #define REMOTING_CLIENT_DISPLAY_GL_CURSOR_FEEDBACK_H_
|
|
|
| -#include <stdint.h>
|
| +#include <cstdint>
|
|
|
| #include <memory>
|
|
|
| #include "base/macros.h"
|
| +#include "base/memory/weak_ptr.h"
|
| +#include "base/threading/thread_checker.h"
|
| #include "base/time/time.h"
|
| +#include "remoting/client/display/drawable.h"
|
|
|
| namespace remoting {
|
|
|
| -class GlCanvas;
|
| +class Canvas;
|
| class GlRenderLayer;
|
|
|
| // This class draws the cursor feedback on the canvas.
|
| -class GlCursorFeedback {
|
| +class GlCursorFeedback : public Drawable {
|
| public:
|
| GlCursorFeedback();
|
| - ~GlCursorFeedback();
|
| -
|
| - // 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);
|
| + ~GlCursorFeedback() 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();
|
| + // Drawable implementation.
|
| + void SetCanvas(base::WeakPtr<Canvas> canvas) override;
|
| + bool Draw() override;
|
| + int GetZIndex() override;
|
| + base::WeakPtr<Drawable> GetWeakPtr() override;
|
|
|
| private:
|
| std::unique_ptr<GlRenderLayer> layer_;
|
| @@ -41,6 +41,9 @@ class GlCursorFeedback {
|
| float cursor_y_ = 0;
|
| base::TimeTicks animation_start_time_;
|
|
|
| + base::ThreadChecker thread_checker_;
|
| + base::WeakPtrFactory<Drawable> weak_factory_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(GlCursorFeedback);
|
| };
|
|
|
|
|