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

Side by Side Diff: ash/system/fractional_view/scale_view.h

Issue 2849953004: SV Test
Patch Set: Created 3 years, 7 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
OLDNEW
(Empty)
1
2 // Copyright 2017 The Chromium Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5
6 #ifndef ASH_SYSTEM_FRACTIONAL_SCALE_VIEW_H_
7 #define ASH_SYSTEM_FRACTIONAL_SCALE_VIEW_H_
8
9 #include "base/macros.h"
10 #include "ui/views/controls/button/button.h"
11 #include "ui/views/controls/slider.h"
12 #include "ui/views/view.h"
13
14 namespace views {
15 class CustomButton;
16 class Label;
17 }
18
19 namespace ash {
20 class SystemTrayItem;
21 class TriView;
22
23 namespace tray {
24 class ScaleView : public views::View,
25 public views::SliderListener,
26 public views::ButtonListener {
27 public:
28 ScaleView(SystemTrayItem* owner, bool is_default_view);
29
30 ~ScaleView() override;
31
32 void Update();
33
34 // Sets volume level on slider_, |percent| is ranged from [0.00] to [1.00].
35 void SetScaleLevel(float value);
36
37 private:
38 // SliderListener:
39 void SliderValueChanged(views::Slider* sender,
40 float value,
41 float old_value,
42 views::SliderChangeReason reason) override;
43 void SliderDragEnded(views::Slider* sender) override;
44
45 // views::ButtonListener:
46 void ButtonPressed(views::Button* sender, const ui::Event& event) override;
47
48 SystemTrayItem* owner_;
49 // The only immediate child view of |this|. All other view elements are added
50 // to the |tri_view_| to handle layout.
51 TriView* tri_view_;
52 views::CustomButton* more_button_;
53 views::Label* label_;
54 views::Slider* slider_;
55 bool is_default_view_;
56
57 DISALLOW_COPY_AND_ASSIGN(ScaleView);
58 };
59
60 } // namespace tray
61 } // namespace ash
62
63 #endif // ASH_SYSTEM_FRACTIONAL_SCALE_VIEW_H_
OLDNEW
« no previous file with comments | « ash/system/fractional_view/scale_detailed_view.cc ('k') | ash/system/fractional_view/scale_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698