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

Side by Side Diff: ui/views/controls/slider.h

Issue 2527513002: Update ash shelf/tray focus rects. (Closed)
Patch Set: rebase Created 4 years 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 | « ui/gfx/canvas.cc ('k') | ui/views/controls/slider.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 UI_VIEWS_CONTROLS_SLIDER_H_ 5 #ifndef UI_VIEWS_CONTROLS_SLIDER_H_
6 #define UI_VIEWS_CONTROLS_SLIDER_H_ 6 #define UI_VIEWS_CONTROLS_SLIDER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "ui/gfx/animation/animation_delegate.h" 9 #include "ui/gfx/animation/animation_delegate.h"
10 #include "ui/views/view.h" 10 #include "ui/views/view.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 58
59 float value() const { return value_; } 59 float value() const { return value_; }
60 void SetValue(float value); 60 void SetValue(float value);
61 61
62 void SetAccessibleName(const base::string16& name); 62 void SetAccessibleName(const base::string16& name);
63 63
64 void set_enable_accessibility_events(bool enabled) { 64 void set_enable_accessibility_events(bool enabled) {
65 accessibility_events_enabled_ = enabled; 65 accessibility_events_enabled_ = enabled;
66 } 66 }
67 67
68 void set_focus_border_color(SkColor color) { focus_border_color_ = color; }
69
70 // Update UI based on control on/off state. 68 // Update UI based on control on/off state.
71 virtual void UpdateState(bool control_on) = 0; 69 virtual void UpdateState(bool control_on) = 0;
72 70
73 protected: 71 protected:
74 explicit Slider(SliderListener* listener); 72 explicit Slider(SliderListener* listener);
75 73
76 // Returns the current position of the thumb on the slider. 74 // Returns the current position of the thumb on the slider.
77 float GetAnimatingValue() const; 75 float GetAnimatingValue() const;
78 76
79 // Shows or hides the highlight on the slider thumb. The default 77 // Shows or hides the highlight on the slider thumb. The default
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 SliderListener* listener_; 130 SliderListener* listener_;
133 131
134 std::unique_ptr<gfx::SlideAnimation> move_animation_; 132 std::unique_ptr<gfx::SlideAnimation> move_animation_;
135 133
136 float value_; 134 float value_;
137 float keyboard_increment_; 135 float keyboard_increment_;
138 float initial_animating_value_; 136 float initial_animating_value_;
139 bool value_is_valid_; 137 bool value_is_valid_;
140 base::string16 accessible_name_; 138 base::string16 accessible_name_;
141 bool accessibility_events_enabled_; 139 bool accessibility_events_enabled_;
142 SkColor focus_border_color_;
143 140
144 // Relative position of the mouse cursor (or the touch point) on the slider's 141 // Relative position of the mouse cursor (or the touch point) on the slider's
145 // button. 142 // button.
146 int initial_button_offset_; 143 int initial_button_offset_;
147 144
148 DISALLOW_COPY_AND_ASSIGN(Slider); 145 DISALLOW_COPY_AND_ASSIGN(Slider);
149 }; 146 };
150 147
151 } // namespace views 148 } // namespace views
152 149
153 #endif // UI_VIEWS_CONTROLS_SLIDER_H_ 150 #endif // UI_VIEWS_CONTROLS_SLIDER_H_
OLDNEW
« no previous file with comments | « ui/gfx/canvas.cc ('k') | ui/views/controls/slider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698