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

Unified Diff: content/renderer/render_frame_impl.h

Issue 2538853002: Media Remoting: Draw remoting interstitial on poster image. (Closed)
Patch Set: Created 4 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
Index: content/renderer/render_frame_impl.h
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index 48e76c6861fb3d7855c3f6981acdb46d6f91bbc3..4400177bd1ff7dcec15fe793ede1f4e5b461cb33 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -72,6 +72,10 @@
#include "content/renderer/media/android/renderer_media_player_manager.h"
#endif
+#if BUILDFLAG(ENABLE_MEDIA_REMOTING)
+#include "media/remoting/remoting_renderer_controller.h"
+#endif
+
struct FrameMsg_PostMessage_Params;
struct FrameMsg_SerializeAsMHTML_Params;
struct FrameMsg_TextTrackSettings_Params;
@@ -99,7 +103,6 @@ namespace media {
class CdmFactory;
class DecoderFactory;
class MediaPermission;
-class RemotingRendererController;
class RemotingSinkObserver;
class RendererWebMediaPlayerDelegate;
class SurfaceManager;
@@ -126,6 +129,7 @@ class DevToolsAgent;
class DocumentState;
class ExternalPopupMenu;
class HistoryEntry;
+class ImageDownloaderImpl;
class ManifestManager;
class MediaInterfaceProvider;
class MediaStreamDispatcher;
@@ -1071,6 +1075,17 @@ class CONTENT_EXPORT RenderFrameImpl
// media remoting from/to local playback.
std::unique_ptr<media::RemotingRendererController>
CreateRemotingRendererController();
+
+ // Called to download the poster image in given |url|. When done,
+ // PosterDownloaded() is called |cb| will be run.
+ void DownloadPoster(
miu 2016/11/29 22:56:08 These methods bring specific functionality (downlo
xjz 2016/12/02 19:23:10 Done.
+ const GURL& url,
+ const media::RemotingRendererController::PosterDownloadedCallback& cb);
+ void PosterDownloaded(
+ const media::RemotingRendererController::PosterDownloadedCallback& cb,
+ int32_t http_status_code,
+ const std::vector<SkBitmap>& images,
+ const std::vector<gfx::Size>& sizes);
#endif
// Stores the WebLocalFrame we are associated with. This is null from the
@@ -1218,12 +1233,16 @@ class CONTENT_EXPORT RenderFrameImpl
// Lazy-bound pointer to the RemoterFactory service in the browser
// process. Always use the GetRemoterFactory() accessor instead of this.
media::mojom::RemoterFactoryPtr remoter_factory_;
+
// An observer for the remoting sink availability that is used by
// media::RemotingCdmFactory to initialize media::RemotingSourceImpl. Created
// in the constructor of RenderFrameImpl to make sure
// media::RemotingSourceImpl be intialized with correct availability info.
// Own by media::RemotingCdmFactory after it is created.
std::unique_ptr<media::RemotingSinkObserver> remoting_sink_observer_;
+
+ // The downloader used to download poster image, lazily initialized.
+ std::unique_ptr<ImageDownloaderImpl> poster_image_downloader_;
miu 2016/11/29 22:56:08 Looks like ImageDownloaderImpl deletes itself when
xjz 2016/12/02 19:23:10 Not applicable.
#endif
// The CDM and decoder factory attached to this frame, lazily initialized.

Powered by Google App Engine
This is Rietveld 408576698