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

Unified Diff: ash/audio/sounds.cc

Issue 2142463002: ash: Remove media dependency from ash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: oops Created 4 years, 5 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/audio/sounds.h ('k') | ash/common/ash_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/audio/sounds.cc
diff --git a/ash/audio/sounds.cc b/ash/audio/sounds.cc
deleted file mode 100644
index 8eb4b38f93230d2098cdfa132f48c70fe06f01ad..0000000000000000000000000000000000000000
--- a/ash/audio/sounds.cc
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/audio/sounds.h"
-
-#include "ash/common/accessibility_delegate.h"
-#include "ash/common/ash_switches.h"
-#include "ash/common/wm_shell.h"
-#include "base/command_line.h"
-
-using media::SoundsManager;
-
-namespace ash {
-
-bool PlaySystemSoundAlways(SoundsManager::SoundKey key) {
- if (base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kAshDisableSystemSounds))
- return false;
- return SoundsManager::Get()->Play(key);
-}
-
-bool PlaySystemSoundIfSpokenFeedback(SoundsManager::SoundKey key) {
- base::CommandLine* cl = base::CommandLine::ForCurrentProcess();
- if (cl->HasSwitch(switches::kAshDisableSystemSounds))
- return false;
-
- if (cl->HasSwitch(switches::kAshEnableSystemSounds))
- return SoundsManager::Get()->Play(key);
-
- if (!WmShell::Get()->GetAccessibilityDelegate()->IsSpokenFeedbackEnabled())
- return false;
-
- return SoundsManager::Get()->Play(key);
-}
-
-} // namespace ash
« no previous file with comments | « ash/audio/sounds.h ('k') | ash/common/ash_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698