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

Side by Side Diff: content/browser/media/android/browser_media_session_manager.h

Issue 2252783004: Implement MediaSession (metadata) per frame [NOT READY, HAS DEPENDENCY] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor fixes Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_SESSION_MANAGER_H_ 5 #ifndef CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_SESSION_MANAGER_H_
6 #define CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_SESSION_MANAGER_H_ 6 #define CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_SESSION_MANAGER_H_
7 7
8 #include <memory>
whywhat 2016/09/13 16:23:26 nit: seems like this is unused
Zhiqiang Zhang (Slow) 2016/09/13 18:51:52 Done.
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "base/optional.h" 11 #include "base/optional.h"
10 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
13 #include "content/public/common/media_metadata.h"
whywhat 2016/09/13 16:23:26 nit: is this needed for Optional? I thought as lon
Zhiqiang Zhang (Slow) 2016/09/13 18:51:52 Probably not. I got a compiler error when moving t
11 14
12 namespace IPC { 15 namespace IPC {
13 class Message; 16 class Message;
14 } // namespace IPC 17 } // namespace IPC
15 18
16 namespace content { 19 namespace content {
17 20
18 class RenderFrameHost; 21 class RenderFrameHost;
19 struct MediaMetadata; 22 class WebContentsImpl;
20 23
21 class CONTENT_EXPORT BrowserMediaSessionManager { 24 class CONTENT_EXPORT BrowserMediaSessionManager {
22 public: 25 public:
23 explicit BrowserMediaSessionManager(RenderFrameHost* render_frame_host); 26 explicit BrowserMediaSessionManager(RenderFrameHost* render_frame_host,
27 WebContentsImpl* contents);
28 virtual ~BrowserMediaSessionManager();
24 29
25 // Message handlers. 30 // Message handlers.
26 virtual void OnActivate(int session_id, int request_id); 31 virtual void OnActivate(int session_id, int request_id);
27 virtual void OnDeactivate(int session_id, int request_id); 32 virtual void OnDeactivate(int session_id, int request_id);
28 virtual void OnSetMetadata( 33 virtual void OnSetMetadata(
29 int session_id, const base::Optional<MediaMetadata>& metadata); 34 int session_id, const base::Optional<MediaMetadata>& metadata);
30 35
36 const base::Optional<MediaMetadata>& media_metadata() const;
31 int GetRoutingID() const; 37 int GetRoutingID() const;
32 38
33 bool Send(IPC::Message* msg); 39 bool Send(IPC::Message* msg);
34 40
35 private: 41 private:
36 RenderFrameHost* const render_frame_host_; 42 RenderFrameHost* const render_frame_host_;
43 WebContentsImpl* const contents_;
44
45 base::Optional<MediaMetadata> media_metadata_;
37 46
38 DISALLOW_COPY_AND_ASSIGN(BrowserMediaSessionManager); 47 DISALLOW_COPY_AND_ASSIGN(BrowserMediaSessionManager);
39 }; 48 };
40 49
41 } // namespace content 50 } // namespace content
42 51
43 #endif // CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_SESSION_MANAGER_H_ 52 #endif // CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_SESSION_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698