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

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

Issue 9853019: Modify the pure-views slider to reset on ESC. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments Created 8 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 #pragma once 7 #pragma once
8 8
9 #include "ui/base/animation/animation_delegate.h" 9 #include "ui/base/animation/animation_delegate.h"
10 #include "ui/views/view.h" 10 #include "ui/views/view.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 void SetValueInternal(float value, SliderChangeReason reason); 62 void SetValueInternal(float value, SliderChangeReason reason);
63 63
64 // views::View overrides: 64 // views::View overrides:
65 virtual gfx::Size GetPreferredSize() OVERRIDE; 65 virtual gfx::Size GetPreferredSize() OVERRIDE;
66 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; 66 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
67 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; 67 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE;
68 virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE; 68 virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE;
69 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; 69 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE;
70 virtual bool OnKeyPressed(const views::KeyEvent& event) OVERRIDE; 70 virtual bool OnKeyPressed(const views::KeyEvent& event) OVERRIDE;
71 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; 71 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
72 virtual bool AcceleratorPressed(const ui::Accelerator&) OVERRIDE;
72 73
73 // ui::AnimationDelegate overrides: 74 // ui::AnimationDelegate overrides:
74 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; 75 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE;
75 76
76 SliderListener* listener_; 77 SliderListener* listener_;
77 Orientation orientation_; 78 Orientation orientation_;
78 79
79 scoped_ptr<ui::SlideAnimation> move_animation_; 80 scoped_ptr<ui::SlideAnimation> move_animation_;
80 81
81 float value_; 82 float value_;
82 float keyboard_increment_; 83 float keyboard_increment_;
83 float animating_value_; 84 float animating_value_;
85 float original_value_;
84 bool value_is_valid_; 86 bool value_is_valid_;
85 string16 accessible_name_; 87 string16 accessible_name_;
88 bool esc_was_pressed_;
86 89
87 DISALLOW_COPY_AND_ASSIGN(Slider); 90 DISALLOW_COPY_AND_ASSIGN(Slider);
88 }; 91 };
89 92
90 } // namespace views 93 } // namespace views
91 94
92 #endif // UI_VIEWS_CONTROLS_SLIDER_H_ 95 #endif // UI_VIEWS_CONTROLS_SLIDER_H_
OLDNEW
« no previous file with comments | « no previous file | ui/views/controls/slider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698