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

Unified Diff: content/renderer/media/android/renderer_media_session_manager.h

Issue 1436243002: Add render-side manager for MediaSession (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moar tests Created 5 years, 1 month 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 | « content/content_tests.gypi ('k') | content/renderer/media/android/renderer_media_session_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/android/renderer_media_session_manager.h
diff --git a/content/renderer/media/android/renderer_media_session_manager.h b/content/renderer/media/android/renderer_media_session_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..f07b230c113f671884dc25c30d4b714c7bd0a258
--- /dev/null
+++ b/content/renderer/media/android/renderer_media_session_manager.h
@@ -0,0 +1,37 @@
+// 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_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_SESSION_MANAGER_H_
+#define CONTENT_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_SESSION_MANAGER_H_
+
+#include <map>
+
+#include "base/macros.h"
+#include "content/common/content_export.h"
+#include "content/public/renderer/render_frame_observer.h"
+
+namespace content {
+
+class WebMediaSessionAndroid;
+
+class CONTENT_EXPORT RendererMediaSessionManager : public RenderFrameObserver {
+ public:
+ RendererMediaSessionManager(RenderFrame* render_frame);
+ ~RendererMediaSessionManager() override;
+
+ int RegisterMediaSession(WebMediaSessionAndroid* session);
+ void UnregisterMediaSession(int session_id);
+
+ private:
+ friend class WebMediaSessionTest;
+
+ std::map<int, WebMediaSessionAndroid*> sessions_;
+ int next_session_id_;
+
+ DISALLOW_COPY_AND_ASSIGN(RendererMediaSessionManager);
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_SESSION_MANAGER_H_
« no previous file with comments | « content/content_tests.gypi ('k') | content/renderer/media/android/renderer_media_session_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698