Chromium Code Reviews| Index: chrome/browser/chromeos/display/touch_calibrator/touch_calibrator_view.h |
| diff --git a/chrome/browser/chromeos/display/touch_calibrator/touch_calibrator_view.h b/chrome/browser/chromeos/display/touch_calibrator/touch_calibrator_view.h |
| index aeaf20fd86684433e81664e8d1928cca47619958..67b759858cafc7935c0e2175602a2dc69cbb0be8 100644 |
| --- a/chrome/browser/chromeos/display/touch_calibrator/touch_calibrator_view.h |
| +++ b/chrome/browser/chromeos/display/touch_calibrator/touch_calibrator_view.h |
| @@ -11,9 +11,15 @@ |
| #include "ui/views/view.h" |
| namespace views { |
| +class Label; |
| class Widget; |
| } |
| +namespace gfx { |
| +class Animation; |
| +class LinearAnimation; |
| +} |
| + |
| namespace chromeos { |
| // An overlay view used during touch calibration. This view is responsible for |
| @@ -72,10 +78,16 @@ class TouchCalibratorView : public views::View, public gfx::AnimationDelegate { |
| // the touch calibration UX. |
| bool GetDisplayPointLocation(gfx::Point* location); |
| + // Skips/Cancels any current ongoing animation to the end. This is used during |
| + // testing. |
| + void SkipCurrentAnimation(); |
|
stevenjb
2016/12/22 22:03:33
If this is only used for testing, just name it Ski
malaykeshav
2016/12/23 00:09:06
Done
|
| + |
| // Returns the current state of the view. |
| State state() { return state_; } |
| private: |
| + void InitViewContents(); |
| + |
| // The target display on which this view is rendered on. |
| const display::Display display_; |
| @@ -84,6 +96,23 @@ class TouchCalibratorView : public views::View, public gfx::AnimationDelegate { |
| std::unique_ptr<views::Widget> widget_; |
| + SkPaint paint_; |
| + |
| + // Defines the bounds for the background animation. |
| + gfx::RectF background_rect_; |
| + |
| + // Text label indicating how to exit the touch calibration. |
| + views::Label* exit_label_; |
| + |
| + // Start and end opacity values used during the fade animation. This is set |
| + // before the animation begins. |
| + float start_opacity_value_; |
| + float end_opacity_value_; |
| + |
| + // Linear animation used for various aniations including fade-in, fade out, |
| + // and view translation. |
| + std::unique_ptr<gfx::LinearAnimation> animator_; |
| + |
| State state_ = UNKNOWN; |
| DISALLOW_COPY_AND_ASSIGN(TouchCalibratorView); |