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

Side by Side Diff: media/blink/renderer_media_player_interface.h

Issue 1570043002: Implement MediaSession on top of the WebMediaPlayerDelegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@media_session
Patch Set: Reorder. Created 4 years, 11 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
« no previous file with comments | « ipc/ipc_message_start.h ('k') | media/blink/webmediaplayer_cast_android.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 MEDIA_BLINK_RENDERER_MEDIA_PLAYER_INTERFACE_H_ 5 #ifndef MEDIA_BLINK_RENDERER_MEDIA_PLAYER_INTERFACE_H_
6 #define MEDIA_BLINK_RENDERER_MEDIA_PLAYER_INTERFACE_H_ 6 #define MEDIA_BLINK_RENDERER_MEDIA_PLAYER_INTERFACE_H_
7 7
8 // This file contains interfaces modeled after classes in 8 // This file contains interfaces modeled after classes in
9 // content/renderer/media/android for the purposes of letting clases in 9 // content/renderer/media/android for the purposes of letting clases in
10 // this directory implement and/or interact with those classes. 10 // this directory implement and/or interact with those classes.
11 // It's a stop-gap used to support cast on android until a better solution 11 // It's a stop-gap used to support cast on android until a better solution
12 // is implemented: crbug/575276 12 // is implemented: crbug/575276
13 13
14 #include <string> 14 #include <string>
15 #include "base/time/time.h" 15 #include "base/time/time.h"
16 #include "media/blink/webmediaplayer_delegate.h"
16 #include "ui/gfx/geometry/rect_f.h" 17 #include "ui/gfx/geometry/rect_f.h"
17 #include "url/gurl.h" 18 #include "url/gurl.h"
18 19
19 // Dictates which type of media playback is being initialized. 20 // Dictates which type of media playback is being initialized.
20 enum MediaPlayerHostMsg_Initialize_Type { 21 enum MediaPlayerHostMsg_Initialize_Type {
21 MEDIA_PLAYER_TYPE_URL, 22 MEDIA_PLAYER_TYPE_URL,
22 MEDIA_PLAYER_TYPE_MEDIA_SOURCE, 23 MEDIA_PLAYER_TYPE_MEDIA_SOURCE,
23 MEDIA_PLAYER_TYPE_REMOTE_ONLY, 24 MEDIA_PLAYER_TYPE_REMOTE_ONLY,
24 MEDIA_PLAYER_TYPE_LAST = MEDIA_PLAYER_TYPE_REMOTE_ONLY 25 MEDIA_PLAYER_TYPE_LAST = MEDIA_PLAYER_TYPE_REMOTE_ONLY
25 }; 26 };
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 79
79 class RendererMediaPlayerManagerInterface { 80 class RendererMediaPlayerManagerInterface {
80 public: 81 public:
81 // Initializes a MediaPlayerAndroid object in browser process. 82 // Initializes a MediaPlayerAndroid object in browser process.
82 virtual void Initialize(MediaPlayerHostMsg_Initialize_Type type, 83 virtual void Initialize(MediaPlayerHostMsg_Initialize_Type type,
83 int player_id, 84 int player_id,
84 const GURL& url, 85 const GURL& url,
85 const GURL& first_party_for_cookies, 86 const GURL& first_party_for_cookies,
86 int demuxer_client_id, 87 int demuxer_client_id,
87 const GURL& frame_url, 88 const GURL& frame_url,
88 bool allow_credentials) = 0; 89 bool allow_credentials,
90 int delegate_id) = 0;
89 91
90 // Starts the player. 92 // Starts the player.
91 virtual void Start(int player_id) = 0; 93 virtual void Start(int player_id) = 0;
92 94
93 // Pauses the player. 95 // Pauses the player.
94 // is_media_related_action should be true if this pause is coming from an 96 // is_media_related_action should be true if this pause is coming from an
95 // an action that explicitly pauses the video (user pressing pause, JS, etc.) 97 // an action that explicitly pauses the video (user pressing pause, JS, etc.)
96 // Otherwise it should be false if Pause is being called due to other reasons 98 // Otherwise it should be false if Pause is being called due to other reasons
97 // (cleanup, freeing resources, etc.) 99 // (cleanup, freeing resources, etc.)
98 virtual void Pause(int player_id, bool is_media_related_action) = 0; 100 virtual void Pause(int player_id, bool is_media_related_action) = 0;
(...skipping 20 matching lines...) Expand all
119 virtual void RequestRemotePlaybackControl(int player_id) = 0; 121 virtual void RequestRemotePlaybackControl(int player_id) = 0;
120 122
121 // Registers and unregisters a RendererMediaPlayerInterface object. 123 // Registers and unregisters a RendererMediaPlayerInterface object.
122 virtual int RegisterMediaPlayer(RendererMediaPlayerInterface* player) = 0; 124 virtual int RegisterMediaPlayer(RendererMediaPlayerInterface* player) = 0;
123 virtual void UnregisterMediaPlayer(int player_id) = 0; 125 virtual void UnregisterMediaPlayer(int player_id) = 0;
124 }; 126 };
125 127
126 } // namespace media 128 } // namespace media
127 129
128 #endif // MEDIA_BLINK_RENDERER_MEDIA_PLAYER_INTERFACE_H_ 130 #endif // MEDIA_BLINK_RENDERER_MEDIA_PLAYER_INTERFACE_H_
OLDNEW
« no previous file with comments | « ipc/ipc_message_start.h ('k') | media/blink/webmediaplayer_cast_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698