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_SYSTEM_AUDIO_VOLUME_VIEW_H_ | 5 #ifndef ASH_SYSTEM_AUDIO_VOLUME_VIEW_H_ |
6 #define ASH_SYSTEM_AUDIO_VOLUME_VIEW_H_ | 6 #define ASH_SYSTEM_AUDIO_VOLUME_VIEW_H_ |
7 | 7 |
8 #include "ash/system/tray/actionable_view.h" | 8 #include "ash/system/tray/actionable_view.h" |
9 #include "ui/gfx/font.h" | 9 #include "ui/gfx/font.h" |
10 #include "ui/views/controls/button/button.h" | 10 #include "ui/views/controls/button/button.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 // Sets volume level on slider_, |percent| is ranged from [0.00] to [1.00]. | 43 // Sets volume level on slider_, |percent| is ranged from [0.00] to [1.00]. |
44 void SetVolumeLevel(float percent); | 44 void SetVolumeLevel(float percent); |
45 | 45 |
46 private: | 46 private: |
47 // Updates bar_, device_type_ icon, and more_ buttons. | 47 // Updates bar_, device_type_ icon, and more_ buttons. |
48 void UpdateDeviceTypeAndMore(); | 48 void UpdateDeviceTypeAndMore(); |
49 void HandleVolumeUp(float percent); | 49 void HandleVolumeUp(float percent); |
50 void HandleVolumeDown(float percent); | 50 void HandleVolumeDown(float percent); |
51 | 51 |
52 // Overridden from views::View. | 52 // Overridden from views::View. |
53 virtual void Layout() OVERRIDE; | 53 virtual void Layout() override; |
54 | 54 |
55 // Overridden from views::ButtonListener. | 55 // Overridden from views::ButtonListener. |
56 virtual void ButtonPressed(views::Button* sender, | 56 virtual void ButtonPressed(views::Button* sender, |
57 const ui::Event& event) OVERRIDE; | 57 const ui::Event& event) override; |
58 | 58 |
59 // Overridden from views::SliderListener. | 59 // Overridden from views::SliderListener. |
60 virtual void SliderValueChanged(views::Slider* sender, | 60 virtual void SliderValueChanged(views::Slider* sender, |
61 float value, | 61 float value, |
62 float old_value, | 62 float old_value, |
63 views::SliderChangeReason reason) OVERRIDE; | 63 views::SliderChangeReason reason) override; |
64 | 64 |
65 // Overriden from ActionableView. | 65 // Overriden from ActionableView. |
66 virtual bool PerformAction(const ui::Event& event) OVERRIDE; | 66 virtual bool PerformAction(const ui::Event& event) override; |
67 | 67 |
68 SystemTrayItem* owner_; | 68 SystemTrayItem* owner_; |
69 system::TrayAudioDelegate* audio_delegate_; | 69 system::TrayAudioDelegate* audio_delegate_; |
70 VolumeButton* icon_; | 70 VolumeButton* icon_; |
71 VolumeSlider* slider_; | 71 VolumeSlider* slider_; |
72 BarSeparator* bar_; | 72 BarSeparator* bar_; |
73 views::ImageView* device_type_; | 73 views::ImageView* device_type_; |
74 views::ImageView* more_; | 74 views::ImageView* more_; |
75 bool is_default_view_; | 75 bool is_default_view_; |
76 | 76 |
77 DISALLOW_COPY_AND_ASSIGN(VolumeView); | 77 DISALLOW_COPY_AND_ASSIGN(VolumeView); |
78 }; | 78 }; |
79 | 79 |
80 } // namespace tray | 80 } // namespace tray |
81 } // namespace ash | 81 } // namespace ash |
82 | 82 |
83 #endif // ASH_SYSTEM_AUDIO_VOLUME_VIEW_H_ | 83 #endif // ASH_SYSTEM_AUDIO_VOLUME_VIEW_H_ |
84 | 84 |
OLD | NEW |