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

Side by Side Diff: chrome/browser/chromeos/display/touch_calibrator/touch_calibrator_view.h

Issue 2600213002: Adds animated touch point and the hint box for touch calibration UX (Closed)
Patch Set: Resolving comments Created 3 years, 11 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 | chrome/browser/chromeos/display/touch_calibrator/touch_calibrator_view.cc » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 CHROME_BROWSER_CHROMEOS_DISPLAY_TOUCH_CALIBRATOR_TOUCH_CALIBRATOR_VIEW_H _ 5 #ifndef CHROME_BROWSER_CHROMEOS_DISPLAY_TOUCH_CALIBRATOR_TOUCH_CALIBRATOR_VIEW_H _
6 #define CHROME_BROWSER_CHROMEOS_DISPLAY_TOUCH_CALIBRATOR_TOUCH_CALIBRATOR_VIEW_H _ 6 #define CHROME_BROWSER_CHROMEOS_DISPLAY_TOUCH_CALIBRATOR_TOUCH_CALIBRATOR_VIEW_H _
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "ui/display/display.h" 9 #include "ui/display/display.h"
10 #include "ui/gfx/animation/animation_delegate.h" 10 #include "ui/gfx/animation/animation_delegate.h"
11 #include "ui/views/view.h" 11 #include "ui/views/view.h"
12 12
13 namespace views { 13 namespace views {
14 class Label; 14 class Label;
15 class Widget; 15 class Widget;
16 } 16 }
17 17
18 namespace gfx { 18 namespace gfx {
19 class Animation; 19 class Animation;
20 class LinearAnimation; 20 class LinearAnimation;
21 } 21 }
22 22
23 namespace chromeos { 23 namespace chromeos {
24 24
25 class CircularThrobberView;
26
25 // An overlay view used during touch calibration. This view is responsible for 27 // An overlay view used during touch calibration. This view is responsible for
26 // all animations and UX during touch calibration on all displays currently 28 // all animations and UX during touch calibration on all displays currently
27 // active on the device. The view on the display being calibrated is the primary 29 // active on the device. The view on the display being calibrated is the primary
28 // touch calibration view. 30 // touch calibration view.
29 // |TouchCalibratorView| acts as a state machine and has an API to toggle its 31 // |TouchCalibratorView| acts as a state machine and has an API to toggle its
30 // state or get the current state. 32 // state or get the current state.
31 class TouchCalibratorView : public views::View, public gfx::AnimationDelegate { 33 class TouchCalibratorView : public views::View, public gfx::AnimationDelegate {
32 public: 34 public:
33 // Different states of |TouchCalibratorView| in order. 35 // Different states of |TouchCalibratorView| in order.
34 enum State { 36 enum State {
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 107
106 // Start and end opacity values used during the fade animation. This is set 108 // Start and end opacity values used during the fade animation. This is set
107 // before the animation begins. 109 // before the animation begins.
108 float start_opacity_value_; 110 float start_opacity_value_;
109 float end_opacity_value_; 111 float end_opacity_value_;
110 112
111 // Linear animation used for various aniations including fade-in, fade out, 113 // Linear animation used for various aniations including fade-in, fade out,
112 // and view translation. 114 // and view translation.
113 std::unique_ptr<gfx::LinearAnimation> animator_; 115 std::unique_ptr<gfx::LinearAnimation> animator_;
114 116
117 // View responsible for displaying the animated circular icon that the user
118 // touches to calibrate the screen.
119 CircularThrobberView* throbber_circle_;
120
121 // A hint box displayed next to the first touch point to assist user with
122 // information about the next step.
123 views::View* hint_box_view_;
124
125 // View that contains the animated throbber circle and a text label informing
126 // the user to tap the circle to continue calibration.
127 views::View* touch_point_view_;
128
115 State state_ = UNKNOWN; 129 State state_ = UNKNOWN;
116 130
117 DISALLOW_COPY_AND_ASSIGN(TouchCalibratorView); 131 DISALLOW_COPY_AND_ASSIGN(TouchCalibratorView);
118 }; 132 };
119 133
120 } // namespace chromeos 134 } // namespace chromeos
121 135
122 #endif // CHROME_BROWSER_CHROMEOS_DISPLAY_TOUCH_CALIBRATOR_TOUCH_CALIBRATOR_VIE W_H_ 136 #endif // CHROME_BROWSER_CHROMEOS_DISPLAY_TOUCH_CALIBRATOR_TOUCH_CALIBRATOR_VIE W_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/display/touch_calibrator/touch_calibrator_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698