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

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

Issue 2629003003: Revert of Adds animated touch point and the hint box for touch calibration UX (Closed)
Patch Set: 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
27 // An overlay view used during touch calibration. This view is responsible for 25 // An overlay view used during touch calibration. This view is responsible for
28 // all animations and UX during touch calibration on all displays currently 26 // all animations and UX during touch calibration on all displays currently
29 // active on the device. The view on the display being calibrated is the primary 27 // active on the device. The view on the display being calibrated is the primary
30 // touch calibration view. 28 // touch calibration view.
31 // |TouchCalibratorView| acts as a state machine and has an API to toggle its 29 // |TouchCalibratorView| acts as a state machine and has an API to toggle its
32 // state or get the current state. 30 // state or get the current state.
33 class TouchCalibratorView : public views::View, public gfx::AnimationDelegate { 31 class TouchCalibratorView : public views::View, public gfx::AnimationDelegate {
34 public: 32 public:
35 // Different states of |TouchCalibratorView| in order. 33 // Different states of |TouchCalibratorView| in order.
36 enum State { 34 enum State {
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 105
108 // Start and end opacity values used during the fade animation. This is set 106 // Start and end opacity values used during the fade animation. This is set
109 // before the animation begins. 107 // before the animation begins.
110 float start_opacity_value_; 108 float start_opacity_value_;
111 float end_opacity_value_; 109 float end_opacity_value_;
112 110
113 // Linear animation used for various aniations including fade-in, fade out, 111 // Linear animation used for various aniations including fade-in, fade out,
114 // and view translation. 112 // and view translation.
115 std::unique_ptr<gfx::LinearAnimation> animator_; 113 std::unique_ptr<gfx::LinearAnimation> animator_;
116 114
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
129 State state_ = UNKNOWN; 115 State state_ = UNKNOWN;
130 116
131 DISALLOW_COPY_AND_ASSIGN(TouchCalibratorView); 117 DISALLOW_COPY_AND_ASSIGN(TouchCalibratorView);
132 }; 118 };
133 119
134 } // namespace chromeos 120 } // namespace chromeos
135 121
136 #endif // CHROME_BROWSER_CHROMEOS_DISPLAY_TOUCH_CALIBRATOR_TOUCH_CALIBRATOR_VIE W_H_ 122 #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