OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 ASH_COMMON_SYSTEM_CHROMEOS_AUDIO_VOLUME_VIEW_H_ | 5 #ifndef ASH_COMMON_SYSTEM_CHROMEOS_AUDIO_VOLUME_VIEW_H_ |
6 #define ASH_COMMON_SYSTEM_CHROMEOS_AUDIO_VOLUME_VIEW_H_ | 6 #define ASH_COMMON_SYSTEM_CHROMEOS_AUDIO_VOLUME_VIEW_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "ui/views/controls/button/button.h" | 9 #include "ui/views/controls/button/button.h" |
10 #include "ui/views/controls/slider.h" | 10 #include "ui/views/controls/slider.h" |
11 #include "ui/views/view.h" | 11 #include "ui/views/view.h" |
12 | 12 |
13 namespace views { | 13 namespace views { |
14 class CustomButton; | 14 class CustomButton; |
15 class ImageView; | 15 class ImageView; |
16 class Separator; | |
17 class Slider; | 16 class Slider; |
18 } | 17 } |
19 | 18 |
20 namespace ash { | 19 namespace ash { |
21 class SystemTrayItem; | 20 class SystemTrayItem; |
22 class TriView; | 21 class TriView; |
23 | 22 |
24 namespace system { | 23 namespace system { |
25 class TrayAudioDelegate; | 24 class TrayAudioDelegate; |
26 } | 25 } |
(...skipping 24 matching lines...) Expand all Loading... |
51 | 50 |
52 // SliderListener: | 51 // SliderListener: |
53 void SliderValueChanged(views::Slider* sender, | 52 void SliderValueChanged(views::Slider* sender, |
54 float value, | 53 float value, |
55 float old_value, | 54 float old_value, |
56 views::SliderChangeReason reason) override; | 55 views::SliderChangeReason reason) override; |
57 | 56 |
58 // views::ButtonListener: | 57 // views::ButtonListener: |
59 void ButtonPressed(views::Button* sender, const ui::Event& event) override; | 58 void ButtonPressed(views::Button* sender, const ui::Event& event) override; |
60 | 59 |
61 // views::View: | |
62 bool OnKeyPressed(const ui::KeyEvent& event) override; | |
63 void OnBoundsChanged(const gfx::Rect& previous_bounds) override; | |
64 | |
65 SystemTrayItem* owner_; | 60 SystemTrayItem* owner_; |
66 // The only immediate child view of |this|. All other view elements are added | 61 // The only immediate child view of |this|. All other view elements are added |
67 // to the |tri_view_| to handle layout. | 62 // to the |tri_view_| to handle layout. |
68 TriView* tri_view_; | 63 TriView* tri_view_; |
69 system::TrayAudioDelegate* audio_delegate_; | 64 system::TrayAudioDelegate* audio_delegate_; |
70 views::CustomButton* more_button_; | 65 views::CustomButton* more_button_; |
71 VolumeButton* icon_; | 66 VolumeButton* icon_; |
72 views::Slider* slider_; | 67 views::Slider* slider_; |
73 views::Separator* separator_; // Not used in material design. | |
74 views::ImageView* device_type_; | 68 views::ImageView* device_type_; |
75 bool is_default_view_; | 69 bool is_default_view_; |
76 | 70 |
77 DISALLOW_COPY_AND_ASSIGN(VolumeView); | 71 DISALLOW_COPY_AND_ASSIGN(VolumeView); |
78 }; | 72 }; |
79 | 73 |
80 } // namespace tray | 74 } // namespace tray |
81 } // namespace ash | 75 } // namespace ash |
82 | 76 |
83 #endif // ASH_COMMON_SYSTEM_CHROMEOS_AUDIO_VOLUME_VIEW_H_ | 77 #endif // ASH_COMMON_SYSTEM_CHROMEOS_AUDIO_VOLUME_VIEW_H_ |
OLD | NEW |