Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 | |
| 2 | |
|
oshima
2017/05/06 19:50:22
nit: remove empty lines
malaykeshav
2017/05/08 19:18:06
Done
| |
| 3 // Copyright 2017 The Chromium Authors. All rights reserved. | |
| 4 // Use of this source code is governed by a BSD-style license that can be | |
| 5 // found in the LICENSE file. | |
| 6 | |
| 7 #ifndef ASH_SYSTEM_DISPLAY_SCALE_SCALE_VIEW_H_ | |
| 8 #define ASH_SYSTEM_DISPLAY_SCALE_SCALE_VIEW_H_ | |
| 9 | |
| 10 #include "base/macros.h" | |
| 11 #include "ui/views/controls/button/button.h" | |
| 12 #include "ui/views/controls/slider.h" | |
| 13 #include "ui/views/view.h" | |
| 14 | |
| 15 namespace views { | |
| 16 class CustomButton; | |
| 17 class Label; | |
| 18 } | |
| 19 | |
| 20 namespace ash { | |
| 21 class SystemTrayItem; | |
| 22 class TriView; | |
| 23 | |
| 24 namespace tray { | |
| 25 class ScaleView : public views::View, | |
| 26 public views::SliderListener, | |
| 27 public views::ButtonListener { | |
| 28 public: | |
| 29 ScaleView(SystemTrayItem* owner, bool is_default_view); | |
| 30 | |
| 31 ~ScaleView() override; | |
| 32 | |
| 33 private: | |
| 34 // SliderListener: | |
| 35 void SliderValueChanged(views::Slider* sender, | |
| 36 float value, | |
| 37 float old_value, | |
| 38 views::SliderChangeReason reason) override; | |
| 39 void SliderDragEnded(views::Slider* sender) override; | |
| 40 | |
| 41 // views::ButtonListener: | |
| 42 void ButtonPressed(views::Button* sender, const ui::Event& event) override; | |
| 43 | |
| 44 SystemTrayItem* owner_; | |
| 45 // The only immediate child view of |this|. All other view elements are added | |
| 46 // to the |tri_view_| to handle layout. | |
| 47 TriView* tri_view_; | |
| 48 views::CustomButton* more_button_; | |
| 49 views::Label* label_; | |
| 50 views::Slider* slider_; | |
| 51 bool is_default_view_; | |
| 52 | |
| 53 DISALLOW_COPY_AND_ASSIGN(ScaleView); | |
| 54 }; | |
| 55 | |
| 56 } // namespace tray | |
| 57 } // namespace ash | |
| 58 | |
| 59 #endif // ASH_SYSTEM_DISPLAY_SCALE_SCALE_VIEW_H_ | |
| OLD | NEW |