OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/chromeos/audio/tray_audio.h" | 5 #include "ash/system/chromeos/audio/tray_audio.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 | 8 |
9 #include "ash/ash_constants.h" | 9 #include "ash/ash_constants.h" |
10 #include "ash/ash_switches.h" | 10 #include "ash/ash_switches.h" |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 public views::SliderListener { | 199 public views::SliderListener { |
200 public: | 200 public: |
201 VolumeView(SystemTrayItem* owner, bool is_default_view) | 201 VolumeView(SystemTrayItem* owner, bool is_default_view) |
202 : owner_(owner), | 202 : owner_(owner), |
203 icon_(NULL), | 203 icon_(NULL), |
204 slider_(NULL), | 204 slider_(NULL), |
205 bar_(NULL), | 205 bar_(NULL), |
206 device_type_(NULL), | 206 device_type_(NULL), |
207 more_(NULL), | 207 more_(NULL), |
208 is_default_view_(is_default_view) { | 208 is_default_view_(is_default_view) { |
209 set_focusable(false); | 209 SetFocusable(false); |
210 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal, | 210 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal, |
211 kTrayPopupPaddingHorizontal, 0, kTrayPopupPaddingBetweenItems)); | 211 kTrayPopupPaddingHorizontal, 0, kTrayPopupPaddingBetweenItems)); |
212 | 212 |
213 icon_ = new VolumeButton(this); | 213 icon_ = new VolumeButton(this); |
214 AddChildView(icon_); | 214 AddChildView(icon_); |
215 | 215 |
216 slider_ = new VolumeSlider(this); | 216 slider_ = new VolumeSlider(this); |
217 AddChildView(slider_); | 217 AddChildView(slider_); |
218 | 218 |
219 bar_ = new BarSeparator; | 219 bar_ = new BarSeparator; |
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
651 if (audio_detail_) | 651 if (audio_detail_) |
652 audio_detail_->Update(); | 652 audio_detail_->Update(); |
653 if (volume_view_) { | 653 if (volume_view_) { |
654 volume_view_->SetVolumeLevel(GetVolumeLevel()); | 654 volume_view_->SetVolumeLevel(GetVolumeLevel()); |
655 volume_view_->Update(); | 655 volume_view_->Update(); |
656 } | 656 } |
657 } | 657 } |
658 | 658 |
659 } // namespace internal | 659 } // namespace internal |
660 } // namespace ash | 660 } // namespace ash |
OLD | NEW |