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

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

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

Powered by Google App Engine
This is Rietveld 408576698