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 #include "ash/system/audio/volume_view.h" | 5 #include "ash/system/audio/volume_view.h" |
6 | 6 |
7 #include "ash/ash_constants.h" | 7 #include "ash/ash_constants.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/system/audio/tray_audio.h" | 9 #include "ash/system/audio/tray_audio.h" |
10 #include "ash/system/audio/tray_audio_delegate.h" | 10 #include "ash/system/audio/tray_audio_delegate.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 const int kExtraPaddingBetweenBarAndMore = 10; | 28 const int kExtraPaddingBetweenBarAndMore = 10; |
29 | 29 |
30 // IDR_AURA_UBER_TRAY_VOLUME_LEVELS contains 5 images, | 30 // IDR_AURA_UBER_TRAY_VOLUME_LEVELS contains 5 images, |
31 // The one for mute is at the 0 index and the other | 31 // The one for mute is at the 0 index and the other |
32 // four are used for ascending volume levels. | 32 // four are used for ascending volume levels. |
33 const int kVolumeLevels = 4; | 33 const int kVolumeLevels = 4; |
34 | 34 |
35 } // namespace | 35 } // namespace |
36 | 36 |
37 namespace ash { | 37 namespace ash { |
38 namespace internal { | |
39 namespace tray { | 38 namespace tray { |
40 | 39 |
41 class VolumeButton : public views::ToggleImageButton { | 40 class VolumeButton : public views::ToggleImageButton { |
42 public: | 41 public: |
43 VolumeButton(views::ButtonListener* listener, | 42 VolumeButton(views::ButtonListener* listener, |
44 system::TrayAudioDelegate* audio_delegate) | 43 system::TrayAudioDelegate* audio_delegate) |
45 : views::ToggleImageButton(listener), | 44 : views::ToggleImageButton(listener), |
46 audio_delegate_(audio_delegate), | 45 audio_delegate_(audio_delegate), |
47 image_index_(-1) { | 46 image_index_(-1) { |
48 SetImageAlignment(ALIGN_CENTER, ALIGN_MIDDLE); | 47 SetImageAlignment(ALIGN_CENTER, ALIGN_MIDDLE); |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 } | 320 } |
322 | 321 |
323 bool VolumeView::PerformAction(const ui::Event& event) { | 322 bool VolumeView::PerformAction(const ui::Event& event) { |
324 if (!more_->visible()) | 323 if (!more_->visible()) |
325 return false; | 324 return false; |
326 owner_->TransitionDetailedView(); | 325 owner_->TransitionDetailedView(); |
327 return true; | 326 return true; |
328 } | 327 } |
329 | 328 |
330 } // namespace tray | 329 } // namespace tray |
331 } // namespace internal | |
332 } // namespace ash | 330 } // namespace ash |
OLD | NEW |