| OLD | NEW |
| (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_ |
| OLD | NEW |