| 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_AUDIO_VOLUME_VIEW_H_ | 5 #ifndef ASH_COMMON_SYSTEM_CHROMEOS_AUDIO_VOLUME_VIEW_H_ |
| 6 #define ASH_COMMON_SYSTEM_AUDIO_VOLUME_VIEW_H_ | 6 #define ASH_COMMON_SYSTEM_CHROMEOS_AUDIO_VOLUME_VIEW_H_ |
| 7 | 7 |
| 8 #include "ash/common/system/tray/actionable_view.h" | 8 #include "ash/common/system/tray/actionable_view.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "ui/gfx/font.h" | 10 #include "ui/gfx/font.h" |
| 11 #include "ui/views/controls/button/button.h" | 11 #include "ui/views/controls/button/button.h" |
| 12 #include "ui/views/controls/slider.h" | 12 #include "ui/views/controls/slider.h" |
| 13 | 13 |
| 14 namespace views { | 14 namespace views { |
| 15 class View; | 15 class View; |
| 16 class ImageView; | 16 class ImageView; |
| 17 class Separator; | 17 class Separator; |
| 18 class Slider; | 18 class Slider; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace ash { | 21 namespace ash { |
| 22 class SystemTrayItem; | 22 class SystemTrayItem; |
| 23 | 23 |
| 24 namespace system { | 24 namespace system { |
| 25 class TrayAudioDelegate; | 25 class TrayAudioDelegate; |
| 26 } | 26 } |
| 27 | 27 |
| 28 namespace tray { | 28 namespace tray { |
| 29 class VolumeButton; | 29 class VolumeButton; |
| 30 | 30 |
| 31 class VolumeView : public ActionableView, | 31 class VolumeView : public ActionableView, public views::SliderListener { |
| 32 public views::SliderListener { | |
| 33 public: | 32 public: |
| 34 VolumeView(SystemTrayItem* owner, | 33 VolumeView(SystemTrayItem* owner, |
| 35 system::TrayAudioDelegate* audio_delegate, | 34 system::TrayAudioDelegate* audio_delegate, |
| 36 bool is_default_view); | 35 bool is_default_view); |
| 37 | 36 |
| 38 ~VolumeView() override; | 37 ~VolumeView() override; |
| 39 | 38 |
| 40 void Update(); | 39 void Update(); |
| 41 | 40 |
| 42 // Sets volume level on slider_, |percent| is ranged from [0.00] to [1.00]. | 41 // Sets volume level on slider_, |percent| is ranged from [0.00] to [1.00]. |
| (...skipping 27 matching lines...) Expand all Loading... |
| 70 views::ImageView* device_type_; | 69 views::ImageView* device_type_; |
| 71 views::ImageView* more_; | 70 views::ImageView* more_; |
| 72 bool is_default_view_; | 71 bool is_default_view_; |
| 73 | 72 |
| 74 DISALLOW_COPY_AND_ASSIGN(VolumeView); | 73 DISALLOW_COPY_AND_ASSIGN(VolumeView); |
| 75 }; | 74 }; |
| 76 | 75 |
| 77 } // namespace tray | 76 } // namespace tray |
| 78 } // namespace ash | 77 } // namespace ash |
| 79 | 78 |
| 80 #endif // ASH_COMMON_SYSTEM_AUDIO_VOLUME_VIEW_H_ | 79 #endif // ASH_COMMON_SYSTEM_CHROMEOS_AUDIO_VOLUME_VIEW_H_ |
| OLD | NEW |