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

Side by Side Diff: content/renderer/render_frame_impl.h

Issue 2389473002: Media Remoting: Add RemotingController. (Closed)
Patch Set: Rebased. Created 4 years, 2 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 | « content/renderer/BUILD.gn ('k') | content/renderer/render_frame_impl.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_RENDERER_RENDER_FRAME_IMPL_H_ 5 #ifndef CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
6 #define CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ 6 #define CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 class Point; 98 class Point;
99 class Range; 99 class Range;
100 class Rect; 100 class Rect;
101 } 101 }
102 102
103 namespace media { 103 namespace media {
104 class CdmFactory; 104 class CdmFactory;
105 class DecoderFactory; 105 class DecoderFactory;
106 class MediaPermission; 106 class MediaPermission;
107 class MediaServiceProvider; 107 class MediaServiceProvider;
108 class RemotingController;
108 class RendererWebMediaPlayerDelegate; 109 class RendererWebMediaPlayerDelegate;
109 class SurfaceManager; 110 class SurfaceManager;
110 class UrlIndex; 111 class UrlIndex;
111 class WebEncryptedMediaClientImpl; 112 class WebEncryptedMediaClientImpl;
112 } 113 }
113 114
114 namespace shell { 115 namespace shell {
115 class InterfaceRegistry; 116 class InterfaceRegistry;
116 class InterfaceProvider; 117 class InterfaceProvider;
117 } 118 }
(...skipping 906 matching lines...) Expand 10 before | Expand all | Expand 10 after
1024 1025
1025 RendererMediaSessionManager* GetMediaSessionManager(); 1026 RendererMediaSessionManager* GetMediaSessionManager();
1026 #endif 1027 #endif
1027 1028
1028 bool AreSecureCodecsSupported(); 1029 bool AreSecureCodecsSupported();
1029 1030
1030 #if defined(ENABLE_MOJO_MEDIA) 1031 #if defined(ENABLE_MOJO_MEDIA)
1031 shell::mojom::InterfaceProvider* GetMediaInterfaceProvider(); 1032 shell::mojom::InterfaceProvider* GetMediaInterfaceProvider();
1032 #endif 1033 #endif
1033 1034
1035 #if BUILDFLAG(ENABLE_MEDIA_REMOTING)
1034 media::mojom::RemoterFactory* GetRemoterFactory(); 1036 media::mojom::RemoterFactory* GetRemoterFactory();
1037 #endif
1038
1035 media::CdmFactory* GetCdmFactory(); 1039 media::CdmFactory* GetCdmFactory();
1036 media::DecoderFactory* GetDecoderFactory(); 1040 media::DecoderFactory* GetDecoderFactory();
1037 1041
1038 void RegisterMojoInterfaces(); 1042 void RegisterMojoInterfaces();
1039 1043
1040 // Connect to an interface provided by the service registry. 1044 // Connect to an interface provided by the service registry.
1041 template <typename Interface> 1045 template <typename Interface>
1042 void GetInterface(mojo::InterfaceRequest<Interface> request); 1046 void GetInterface(mojo::InterfaceRequest<Interface> request);
1043 1047
1044 // Returns the media delegate for WebMediaPlayer usage. If 1048 // Returns the media delegate for WebMediaPlayer usage. If
1045 // |media_player_delegate_| is NULL, one is created. 1049 // |media_player_delegate_| is NULL, one is created.
1046 media::RendererWebMediaPlayerDelegate* GetWebMediaPlayerDelegate(); 1050 media::RendererWebMediaPlayerDelegate* GetWebMediaPlayerDelegate();
1047 1051
1048 // Called to get the WebPlugin to handle find requests in the document. 1052 // Called to get the WebPlugin to handle find requests in the document.
1049 // Returns nullptr if there is no such WebPlugin. 1053 // Returns nullptr if there is no such WebPlugin.
1050 blink::WebPlugin* GetWebPluginForFind(); 1054 blink::WebPlugin* GetWebPluginForFind();
1051 1055
1052 // Sends a reply to the current find operation handling if it was a 1056 // Sends a reply to the current find operation handling if it was a
1053 // synchronous find request. 1057 // synchronous find request.
1054 void SendFindReply(int request_id, 1058 void SendFindReply(int request_id,
1055 int match_count, 1059 int match_count,
1056 int ordinal, 1060 int ordinal,
1057 const blink::WebRect& selection_rect, 1061 const blink::WebRect& selection_rect,
1058 bool final_status_update); 1062 bool final_status_update);
1059 1063
1060 void InitializeBlameContext(RenderFrameImpl* parent_frame); 1064 void InitializeBlameContext(RenderFrameImpl* parent_frame);
1061 1065
1066 #if BUILDFLAG(ENABLE_MEDIA_REMOTING)
1067 // Creates the RemotingController to control whether to switch to/from media
1068 // remoting from/to local playback.
1069 std::unique_ptr<media::RemotingController> CreateRemotingController();
1070 #endif
1071
1062 // Stores the WebLocalFrame we are associated with. This is null from the 1072 // Stores the WebLocalFrame we are associated with. This is null from the
1063 // constructor until BindToWebFrame is called, and it is null after 1073 // constructor until BindToWebFrame is called, and it is null after
1064 // frameDetached is called until destruction (which is asynchronous in the 1074 // frameDetached is called until destruction (which is asynchronous in the
1065 // case of the main frame, but not subframes). 1075 // case of the main frame, but not subframes).
1066 blink::WebLocalFrame* frame_; 1076 blink::WebLocalFrame* frame_;
1067 1077
1068 // Boolean value indicating whether this RenderFrameImpl object is for the 1078 // Boolean value indicating whether this RenderFrameImpl object is for the
1069 // main frame or not. It remains accurate during destruction, even when 1079 // main frame or not. It remains accurate during destruction, even when
1070 // |frame_| has been invalidated. 1080 // |frame_| has been invalidated.
1071 bool is_main_frame_; 1081 bool is_main_frame_;
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
1190 // Manages all media players and sessions in this render frame for 1200 // Manages all media players and sessions in this render frame for
1191 // communicating with the real media player and sessions in the 1201 // communicating with the real media player and sessions in the
1192 // browser process. It's okay to use raw pointers since they're both 1202 // browser process. It's okay to use raw pointers since they're both
1193 // RenderFrameObservers. 1203 // RenderFrameObservers.
1194 RendererMediaPlayerManager* media_player_manager_; 1204 RendererMediaPlayerManager* media_player_manager_;
1195 RendererMediaSessionManager* media_session_manager_; 1205 RendererMediaSessionManager* media_session_manager_;
1196 #endif 1206 #endif
1197 1207
1198 media::SurfaceManager* media_surface_manager_; 1208 media::SurfaceManager* media_surface_manager_;
1199 1209
1210 #if BUILDFLAG(ENABLE_MEDIA_REMOTING)
1200 // Lazy-bound pointer to the RemoterFactory service in the browser 1211 // Lazy-bound pointer to the RemoterFactory service in the browser
1201 // process. Always use the GetRemoterFactory() accessor instead of this. 1212 // process. Always use the GetRemoterFactory() accessor instead of this.
1202 media::mojom::RemoterFactoryPtr remoter_factory_; 1213 media::mojom::RemoterFactoryPtr remoter_factory_;
1214 #endif
1203 1215
1204 // The CDM and decoder factory attached to this frame, lazily initialized. 1216 // The CDM and decoder factory attached to this frame, lazily initialized.
1205 std::unique_ptr<media::CdmFactory> cdm_factory_; 1217 std::unique_ptr<media::CdmFactory> cdm_factory_;
1206 std::unique_ptr<media::DecoderFactory> decoder_factory_; 1218 std::unique_ptr<media::DecoderFactory> decoder_factory_;
1207 1219
1208 // Media resource cache, lazily initialized. 1220 // Media resource cache, lazily initialized.
1209 linked_ptr<media::UrlIndex> url_index_; 1221 linked_ptr<media::UrlIndex> url_index_;
1210 1222
1211 // The devtools agent for this frame; only created for main frame and 1223 // The devtools agent for this frame; only created for main frame and
1212 // local roots. 1224 // local roots.
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
1309 bool name_changed_before_first_commit_ = false; 1321 bool name_changed_before_first_commit_ = false;
1310 1322
1311 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; 1323 base::WeakPtrFactory<RenderFrameImpl> weak_factory_;
1312 1324
1313 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); 1325 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl);
1314 }; 1326 };
1315 1327
1316 } // namespace content 1328 } // namespace content
1317 1329
1318 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ 1330 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
OLDNEW
« no previous file with comments | « content/renderer/BUILD.gn ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698