Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: ash/common/system/audio/tray_audio.cc

Issue 2427913003: Use mojo volume interfaces for mash and classic ash. (Closed)
Patch Set: Split volume and system events observers; only hook up volume. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/common/system/audio/tray_audio.h" 5 #include "ash/common/system/audio/tray_audio.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <utility> 8 #include <utility>
9 9
10 #include "ash/common/ash_constants.h" 10 #include "ash/common/ash_constants.h"
11 #include "ash/common/system/audio/tray_audio_delegate.h" 11 #include "ash/common/system/audio/tray_audio_delegate.h"
12 #include "ash/common/system/audio/volume_view.h" 12 #include "ash/common/system/audio/volume_view.h"
13 #include "ash/common/system/tray/actionable_view.h" 13 #include "ash/common/system/tray/actionable_view.h"
14 #include "ash/common/system/tray/fixed_sized_scroll_view.h" 14 #include "ash/common/system/tray/fixed_sized_scroll_view.h"
15 #include "ash/common/system/tray/hover_highlight_view.h" 15 #include "ash/common/system/tray/hover_highlight_view.h"
16 #include "ash/common/system/tray/system_tray_delegate.h" 16 #include "ash/common/system/tray/system_tray_delegate.h"
17 #include "ash/common/system/tray/system_tray_notifier.h" 17 #include "ash/common/system/tray/system_tray_notifier.h"
18 #include "ash/common/system/tray/tray_constants.h" 18 #include "ash/common/system/tray/tray_constants.h"
19 #include "ash/common/system/volume_control_delegate.h"
20 #include "ash/common/wm_shell.h" 19 #include "ash/common/wm_shell.h"
21 #include "base/strings/utf_string_conversions.h" 20 #include "base/strings/utf_string_conversions.h"
22 #include "grit/ash_resources.h" 21 #include "grit/ash_resources.h"
23 #include "third_party/skia/include/core/SkCanvas.h" 22 #include "third_party/skia/include/core/SkCanvas.h"
24 #include "third_party/skia/include/core/SkPaint.h" 23 #include "third_party/skia/include/core/SkPaint.h"
25 #include "third_party/skia/include/core/SkRect.h" 24 #include "third_party/skia/include/core/SkRect.h"
26 #include "third_party/skia/include/effects/SkGradientShader.h" 25 #include "third_party/skia/include/effects/SkGradientShader.h"
27 #include "ui/display/display.h" 26 #include "ui/display/display.h"
28 #include "ui/display/manager/managed_display_info.h" 27 #include "ui/display/manager/managed_display_info.h"
29 #include "ui/display/screen.h" 28 #include "ui/display/screen.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 if (tray_view()) 175 if (tray_view())
177 tray_view()->SetVisible(GetInitialVisibility()); 176 tray_view()->SetVisible(GetInitialVisibility());
178 if (volume_view_) { 177 if (volume_view_) {
179 volume_view_->SetVolumeLevel( 178 volume_view_->SetVolumeLevel(
180 static_cast<float>(audio_delegate_->GetOutputVolumeLevel()) / 100.0f); 179 static_cast<float>(audio_delegate_->GetOutputVolumeLevel()) / 100.0f);
181 volume_view_->Update(); 180 volume_view_->Update();
182 } 181 }
183 } 182 }
184 183
185 } // namespace ash 184 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/accelerators/accelerator_controller.cc ('k') | ash/common/system/tray/default_system_tray_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698