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

Unified Diff: ash/common/system/audio/tray_audio.cc

Issue 2084533008: mash: Migrate tray audio and deps to common. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync and rebase. Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/common/system/audio/tray_audio.h ('k') | ash/common/system/audio/tray_audio_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/audio/tray_audio.cc
diff --git a/ash/system/audio/tray_audio.cc b/ash/common/system/audio/tray_audio.cc
similarity index 89%
rename from ash/system/audio/tray_audio.cc
rename to ash/common/system/audio/tray_audio.cc
index 85af7e98a5235ed856bccc70c3471753a81d7b6c..792ce4b85bb78fd109cfd3a064fc5b91bdccc274 100644
--- a/ash/system/audio/tray_audio.cc
+++ b/ash/common/system/audio/tray_audio.cc
@@ -2,25 +2,23 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ash/system/audio/tray_audio.h"
+#include "ash/common/system/audio/tray_audio.h"
#include <cmath>
#include <utility>
#include "ash/common/ash_constants.h"
+#include "ash/common/display/display_info.h"
+#include "ash/common/system/audio/tray_audio_delegate.h"
+#include "ash/common/system/audio/volume_view.h"
#include "ash/common/system/tray/actionable_view.h"
#include "ash/common/system/tray/fixed_sized_scroll_view.h"
#include "ash/common/system/tray/hover_highlight_view.h"
#include "ash/common/system/tray/system_tray_delegate.h"
#include "ash/common/system/tray/tray_constants.h"
+#include "ash/common/system/tray/wm_system_tray_notifier.h"
#include "ash/common/system/volume_control_delegate.h"
-#include "ash/display/display_manager.h"
-#include "ash/metrics/user_metrics_recorder.h"
-#include "ash/shell.h"
-#include "ash/system/audio/tray_audio_delegate.h"
-#include "ash/system/audio/volume_view.h"
-#include "ash/system/tray/system_tray.h"
-#include "ash/system/tray/system_tray_notifier.h"
+#include "ash/common/wm_shell.h"
#include "base/strings/utf_string_conversions.h"
#include "grit/ash_resources.h"
#include "third_party/skia/include/core/SkCanvas.h"
@@ -28,6 +26,7 @@
#include "third_party/skia/include/core/SkRect.h"
#include "third_party/skia/include/effects/SkGradientShader.h"
#include "ui/display/display.h"
+#include "ui/display/screen.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/font_list.h"
#include "ui/gfx/image/image.h"
@@ -47,13 +46,13 @@ TrayAudio::TrayAudio(SystemTray* system_tray,
audio_delegate_(std::move(audio_delegate)),
volume_view_(NULL),
pop_up_volume_view_(false) {
- Shell::GetInstance()->system_tray_notifier()->AddAudioObserver(this);
+ WmShell::Get()->system_tray_notifier()->AddAudioObserver(this);
display::Screen::GetScreen()->AddObserver(this);
}
TrayAudio::~TrayAudio() {
display::Screen::GetScreen()->RemoveObserver(this);
- Shell::GetInstance()->system_tray_notifier()->RemoveAudioObserver(this);
+ WmShell::Get()->system_tray_notifier()->RemoveAudioObserver(this);
}
// static
@@ -145,8 +144,7 @@ void TrayAudio::ChangeInternalSpeakerChannelMode() {
system::TrayAudioDelegate::NORMAL;
if (display::Display::HasInternalDisplay()) {
const DisplayInfo& display_info =
- Shell::GetInstance()->display_manager()->GetDisplayInfo(
- display::Display::InternalDisplayId());
+ WmShell::Get()->GetDisplayInfo(display::Display::InternalDisplayId());
if (display_info.GetActiveRotation() == display::Display::ROTATE_180)
channel_mode = system::TrayAudioDelegate::LEFT_RIGHT_SWAPPED;
}
« no previous file with comments | « ash/common/system/audio/tray_audio.h ('k') | ash/common/system/audio/tray_audio_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698