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

Unified Diff: content/browser/media/session/media_session_service_impl.h

Issue 2399023002: Make MediaSession available on Desktop (Closed)
Patch Set: merge BrowserMediaSessionManager into MediaSessionServiceImpl, temporarily removing BrowserTests 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/media/session/media_session_service_impl.h
diff --git a/content/browser/media/android/media_session_service_impl.h b/content/browser/media/session/media_session_service_impl.h
similarity index 72%
rename from content/browser/media/android/media_session_service_impl.h
rename to content/browser/media/session/media_session_service_impl.h
index dcd1b35f177e670c36ea783ffde9991102a3a774..60410dee17e1e39b7058238dc50e8502923e91da 100644
--- a/content/browser/media/android/media_session_service_impl.h
+++ b/content/browser/media/session/media_session_service_impl.h
@@ -2,9 +2,11 @@
// 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_SERVICE_IMPL_H_
-#define CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_SESSION_SERVICE_IMPL_H_
+#ifndef CONTENT_BROWSER_MEDIA_SESSION_MEDIA_SESSION_SERVICE_IMPL_H_
+#define CONTENT_BROWSER_MEDIA_SESSION_MEDIA_SESSION_SERVICE_IMPL_H_
+#include "base/optional.h"
+#include "content/public/common/media_metadata.h"
#include "mojo/public/cpp/bindings/binding.h"
#include "third_party/WebKit/public/platform/modules/mediasession/media_session.mojom.h"
@@ -12,6 +14,7 @@ namespace content {
class RenderFrameHost;
+// There is one MediaSessionService per frame.
class MediaSessionServiceImpl : public blink::mojom::MediaSessionService {
public:
~MediaSessionServiceImpl() override;
@@ -29,7 +32,9 @@ class MediaSessionServiceImpl : public blink::mojom::MediaSessionService {
RenderFrameHost* render_frame_host_;
- // RAII binding of |this| to an MediaSession interface request.
+ base::Optional<MediaMetadata> metadata_;
+
+ // RAII binding of |this| to an MediaSessionService interface request.
// The binding is removed when binding_ is cleared or goes out of scope.
std::unique_ptr<mojo::Binding<blink::mojom::MediaSessionService>> binding_;
@@ -38,4 +43,4 @@ class MediaSessionServiceImpl : public blink::mojom::MediaSessionService {
} // namespace content
-#endif // CONTENT_BROWSER_MEDIA_ANDROID_MEDIA_SESSION_SERVICE_IMPL_H_
+#endif // CONTENT_BROWSER_MEDIA_SESSION_MEDIA_SESSION_SERVICE_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698