Chromium Code Reviews| Index: ash/common/system/audio/volume_view.h |
| diff --git a/ash/common/system/audio/volume_view.h b/ash/common/system/audio/volume_view.h |
| index 3eba8b5705930cb938b17138a9be71d226a35f5c..8452247d48c5bf64d2707418a79c630243f35c5b 100644 |
| --- a/ash/common/system/audio/volume_view.h |
| +++ b/ash/common/system/audio/volume_view.h |
| @@ -5,14 +5,13 @@ |
| #ifndef ASH_COMMON_SYSTEM_AUDIO_VOLUME_VIEW_H_ |
| #define ASH_COMMON_SYSTEM_AUDIO_VOLUME_VIEW_H_ |
| -#include "ash/common/system/tray/actionable_view.h" |
| #include "base/macros.h" |
| -#include "ui/gfx/font.h" |
| #include "ui/views/controls/button/button.h" |
| #include "ui/views/controls/slider.h" |
| +#include "ui/views/view.h" |
| namespace views { |
| -class View; |
| +class CustomButton; |
| class ImageView; |
| class Separator; |
| class Slider; |
| @@ -20,6 +19,7 @@ class Slider; |
| namespace ash { |
| class SystemTrayItem; |
| +class TriView; |
| namespace system { |
| class TrayAudioDelegate; |
| @@ -28,8 +28,9 @@ class TrayAudioDelegate; |
| namespace tray { |
| class VolumeButton; |
| -class VolumeView : public ActionableView, |
| - public views::SliderListener { |
| +class VolumeView : public views::View, |
| + public views::SliderListener, |
| + public views::ButtonListener { |
| public: |
| VolumeView(SystemTrayItem* owner, |
| system::TrayAudioDelegate* audio_delegate, |
| @@ -43,32 +44,32 @@ class VolumeView : public ActionableView, |
| void SetVolumeLevel(float percent); |
| private: |
| - // Updates bar_, device_type_ icon, and more_ buttons. |
| + // Updates device_type_ icon and more_ button. |
| void UpdateDeviceTypeAndMore(); |
| void HandleVolumeUp(float percent); |
| void HandleVolumeDown(float percent); |
| - // Overridden from views::SliderListener. |
| + // SliderListener: |
| void SliderValueChanged(views::Slider* sender, |
| float value, |
| float old_value, |
| views::SliderChangeReason reason) override; |
| - // Overriden from ActionableView. |
| - bool PerformAction(const ui::Event& event) override; |
| + // views::ButtonListener: |
| void ButtonPressed(views::Button* sender, const ui::Event& event) override; |
| // views::View: |
| void OnBoundsChanged(const gfx::Rect& previous_bounds) override; |
| - void GetAccessibleNodeData(ui::AXNodeData* node_data) override; |
| + SystemTrayItem* owner_; |
| + // Container view used to layout the children. |
|
tdanderson
2016/11/09 01:38:33
Maybe add to this comment to clarify that |tri_vie
bruthig
2016/11/10 02:54:54
Done.
|
| + TriView* tri_view_; |
| system::TrayAudioDelegate* audio_delegate_; |
| - views::View* more_region_; |
| + views::CustomButton* more_button_; |
| VolumeButton* icon_; |
| views::Slider* slider_; |
| views::Separator* separator_; |
| views::ImageView* device_type_; |
| - views::ImageView* more_; |
| bool is_default_view_; |
|
tdanderson
2016/11/09 01:38:33
nit: can you please add a "// not used in material
bruthig
2016/11/10 02:54:54
Done.
|
| DISALLOW_COPY_AND_ASSIGN(VolumeView); |