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

Unified Diff: content/browser/media/android/media_session_delegate.h

Issue 1110833004: Move audio focus control from media/ to content/ and make it per WebContents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
Index: content/browser/media/android/media_session_delegate.h
diff --git a/content/browser/media/android/media_session_delegate.h b/content/browser/media/android/media_session_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..7cc7bf143ff6814c0e99187420725e094e4c2eff
--- /dev/null
+++ b/content/browser/media/android/media_session_delegate.h
@@ -0,0 +1,31 @@
+// Copyright 2015 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.
+
+#ifndef CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_SESSION_DELEGATE_H_
+#define CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_SESSION_DELEGATE_H_
+
+#include <jni.h>
+
+#include "base/android/scoped_java_ref.h"
+#include "base/id_map.h"
whywhat 2015/05/12 12:50:46 nit: IWYU - I don't think you need any of those in
mlamouri (slow - plz ping) 2015/05/19 21:56:16 Oups :)
+#include "content/public/browser/web_contents_observer.h"
+#include "content/public/browser/web_contents_user_data.h"
+
+namespace content {
+
+class MediaSessionDelegate {
+ public:
+ MediaSessionDelegate() = default;
+ virtual ~MediaSessionDelegate() = default;
+
+ // The given |player_id| has been suspended by the MediaSession.
+ virtual void OnSuspend(int player_id) = 0;
+
+ // The given |player_id| has been suspended by the MediaSession.
whywhat 2015/05/12 12:50:46 nit: s/suspended/resumed
mlamouri (slow - plz ping) 2015/05/19 21:56:17 Done.
+ virtual void OnResume(int player_id) = 0;
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_SESSION_DELEGATE_H_

Powered by Google App Engine
This is Rietveld 408576698