OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_SESSION_MANAGER_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_SESSION_MANAGER_H_ |
| 7 |
| 8 #include <map> |
| 9 |
| 10 #include "base/macros.h" |
| 11 #include "content/common/content_export.h" |
| 12 #include "content/public/renderer/render_frame_observer.h" |
| 13 |
| 14 namespace content { |
| 15 |
| 16 class WebMediaSessionAndroid; |
| 17 |
| 18 class CONTENT_EXPORT RendererMediaSessionManager : public RenderFrameObserver { |
| 19 public: |
| 20 RendererMediaSessionManager(RenderFrame* render_frame); |
| 21 ~RendererMediaSessionManager() override; |
| 22 |
| 23 int RegisterMediaSession(WebMediaSessionAndroid* session); |
| 24 void UnregisterMediaSession(int session_id); |
| 25 |
| 26 private: |
| 27 friend class WebMediaSessionTest; |
| 28 |
| 29 std::map<int, WebMediaSessionAndroid*> sessions_; |
| 30 int next_session_id_; |
| 31 |
| 32 DISALLOW_COPY_AND_ASSIGN(RendererMediaSessionManager); |
| 33 }; |
| 34 |
| 35 } // namespace content |
| 36 |
| 37 #endif // CONTENT_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_SESSION_MANAGER_H_ |
OLD | NEW |