Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 65 #include "url/gurl.h" | 65 #include "url/gurl.h" |
| 66 | 66 |
| 67 #if defined(ENABLE_PLUGINS) | 67 #if defined(ENABLE_PLUGINS) |
| 68 #include "content/renderer/pepper/plugin_power_saver_helper.h" | 68 #include "content/renderer/pepper/plugin_power_saver_helper.h" |
| 69 #endif | 69 #endif |
| 70 | 70 |
| 71 #if defined(OS_ANDROID) | 71 #if defined(OS_ANDROID) |
| 72 #include "content/renderer/media/android/renderer_media_player_manager.h" | 72 #include "content/renderer/media/android/renderer_media_player_manager.h" |
| 73 #endif | 73 #endif |
| 74 | 74 |
| 75 #if BUILDFLAG(ENABLE_MEDIA_REMOTING) | |
| 76 #include "media/remoting/remoting_renderer_controller.h" | |
| 77 #endif | |
| 78 | |
| 75 struct FrameMsg_PostMessage_Params; | 79 struct FrameMsg_PostMessage_Params; |
| 76 struct FrameMsg_SerializeAsMHTML_Params; | 80 struct FrameMsg_SerializeAsMHTML_Params; |
| 77 struct FrameMsg_TextTrackSettings_Params; | 81 struct FrameMsg_TextTrackSettings_Params; |
| 78 | 82 |
| 79 namespace blink { | 83 namespace blink { |
| 80 class InterfaceRegistry; | 84 class InterfaceRegistry; |
| 81 class WebContentDecryptionModule; | 85 class WebContentDecryptionModule; |
| 82 class WebPresentationClient; | 86 class WebPresentationClient; |
| 83 class WebPushClient; | 87 class WebPushClient; |
| 84 class WebSecurityOrigin; | 88 class WebSecurityOrigin; |
| 85 enum class WebCachePolicy; | 89 enum class WebCachePolicy; |
| 86 struct WebCompositionUnderline; | 90 struct WebCompositionUnderline; |
| 87 struct WebContextMenuData; | 91 struct WebContextMenuData; |
| 88 struct WebCursorInfo; | 92 struct WebCursorInfo; |
| 89 struct WebFindOptions; | 93 struct WebFindOptions; |
| 90 } // namespace blink | 94 } // namespace blink |
| 91 | 95 |
| 92 namespace gfx { | 96 namespace gfx { |
| 93 class Point; | 97 class Point; |
| 94 class Range; | 98 class Range; |
| 95 class Rect; | 99 class Rect; |
| 96 } | 100 } |
| 97 | 101 |
| 98 namespace media { | 102 namespace media { |
| 99 class CdmFactory; | 103 class CdmFactory; |
| 100 class DecoderFactory; | 104 class DecoderFactory; |
| 101 class MediaPermission; | 105 class MediaPermission; |
| 102 class RemotingRendererController; | |
| 103 class RemotingSinkObserver; | 106 class RemotingSinkObserver; |
| 104 class RendererWebMediaPlayerDelegate; | 107 class RendererWebMediaPlayerDelegate; |
| 105 class SurfaceManager; | 108 class SurfaceManager; |
| 106 class UrlIndex; | 109 class UrlIndex; |
| 107 class WebEncryptedMediaClientImpl; | 110 class WebEncryptedMediaClientImpl; |
| 108 } // namespace media | 111 } // namespace media |
| 109 | 112 |
| 110 namespace service_manager { | 113 namespace service_manager { |
| 111 class InterfaceRegistry; | 114 class InterfaceRegistry; |
| 112 class InterfaceProvider; | 115 class InterfaceProvider; |
| 113 } | 116 } |
| 114 | 117 |
| 115 namespace url { | 118 namespace url { |
| 116 class Origin; | 119 class Origin; |
| 117 } | 120 } |
| 118 | 121 |
| 119 namespace content { | 122 namespace content { |
| 120 | 123 |
| 121 class AssociatedInterfaceProviderImpl; | 124 class AssociatedInterfaceProviderImpl; |
| 122 class BlinkInterfaceRegistryImpl; | 125 class BlinkInterfaceRegistryImpl; |
| 123 class ChildFrameCompositingHelper; | 126 class ChildFrameCompositingHelper; |
| 124 class CompositorDependencies; | 127 class CompositorDependencies; |
| 125 class DevToolsAgent; | 128 class DevToolsAgent; |
| 126 class DocumentState; | 129 class DocumentState; |
| 127 class ExternalPopupMenu; | 130 class ExternalPopupMenu; |
| 128 class HistoryEntry; | 131 class HistoryEntry; |
| 132 class ImageDownloaderImpl; | |
| 129 class ManifestManager; | 133 class ManifestManager; |
| 130 class MediaInterfaceProvider; | 134 class MediaInterfaceProvider; |
| 131 class MediaStreamDispatcher; | 135 class MediaStreamDispatcher; |
| 132 class MediaStreamRendererFactory; | 136 class MediaStreamRendererFactory; |
| 133 class MediaPermissionDispatcher; | 137 class MediaPermissionDispatcher; |
| 134 class NavigationState; | 138 class NavigationState; |
| 135 class PageState; | 139 class PageState; |
| 136 class PepperPluginInstanceImpl; | 140 class PepperPluginInstanceImpl; |
| 137 class PresentationDispatcher; | 141 class PresentationDispatcher; |
| 138 class PushMessagingDispatcher; | 142 class PushMessagingDispatcher; |
| (...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1064 const blink::WebRect& selection_rect, | 1068 const blink::WebRect& selection_rect, |
| 1065 bool final_status_update); | 1069 bool final_status_update); |
| 1066 | 1070 |
| 1067 void InitializeBlameContext(RenderFrameImpl* parent_frame); | 1071 void InitializeBlameContext(RenderFrameImpl* parent_frame); |
| 1068 | 1072 |
| 1069 #if BUILDFLAG(ENABLE_MEDIA_REMOTING) | 1073 #if BUILDFLAG(ENABLE_MEDIA_REMOTING) |
| 1070 // Creates the RemotingRendererController to control whether to switch to/from | 1074 // Creates the RemotingRendererController to control whether to switch to/from |
| 1071 // media remoting from/to local playback. | 1075 // media remoting from/to local playback. |
| 1072 std::unique_ptr<media::RemotingRendererController> | 1076 std::unique_ptr<media::RemotingRendererController> |
| 1073 CreateRemotingRendererController(); | 1077 CreateRemotingRendererController(); |
| 1078 | |
| 1079 // Called to download the poster image in given |url|. When done, | |
| 1080 // PosterDownloaded() is called |cb| will be run. | |
| 1081 void DownloadPoster( | |
|
miu
2016/11/29 22:56:08
These methods bring specific functionality (downlo
xjz
2016/12/02 19:23:10
Done.
| |
| 1082 const GURL& url, | |
| 1083 const media::RemotingRendererController::PosterDownloadedCallback& cb); | |
| 1084 void PosterDownloaded( | |
| 1085 const media::RemotingRendererController::PosterDownloadedCallback& cb, | |
| 1086 int32_t http_status_code, | |
| 1087 const std::vector<SkBitmap>& images, | |
| 1088 const std::vector<gfx::Size>& sizes); | |
| 1074 #endif | 1089 #endif |
| 1075 | 1090 |
| 1076 // Stores the WebLocalFrame we are associated with. This is null from the | 1091 // Stores the WebLocalFrame we are associated with. This is null from the |
| 1077 // constructor until BindToWebFrame is called, and it is null after | 1092 // constructor until BindToWebFrame is called, and it is null after |
| 1078 // frameDetached is called until destruction (which is asynchronous in the | 1093 // frameDetached is called until destruction (which is asynchronous in the |
| 1079 // case of the main frame, but not subframes). | 1094 // case of the main frame, but not subframes). |
| 1080 blink::WebLocalFrame* frame_; | 1095 blink::WebLocalFrame* frame_; |
| 1081 | 1096 |
| 1082 // Boolean value indicating whether this RenderFrameImpl object is for the | 1097 // Boolean value indicating whether this RenderFrameImpl object is for the |
| 1083 // main frame or not. It remains accurate during destruction, even when | 1098 // main frame or not. It remains accurate during destruction, even when |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1211 RendererMediaPlayerManager* media_player_manager_; | 1226 RendererMediaPlayerManager* media_player_manager_; |
| 1212 RendererMediaSessionManager* media_session_manager_; | 1227 RendererMediaSessionManager* media_session_manager_; |
| 1213 #endif | 1228 #endif |
| 1214 | 1229 |
| 1215 media::SurfaceManager* media_surface_manager_; | 1230 media::SurfaceManager* media_surface_manager_; |
| 1216 | 1231 |
| 1217 #if BUILDFLAG(ENABLE_MEDIA_REMOTING) | 1232 #if BUILDFLAG(ENABLE_MEDIA_REMOTING) |
| 1218 // Lazy-bound pointer to the RemoterFactory service in the browser | 1233 // Lazy-bound pointer to the RemoterFactory service in the browser |
| 1219 // process. Always use the GetRemoterFactory() accessor instead of this. | 1234 // process. Always use the GetRemoterFactory() accessor instead of this. |
| 1220 media::mojom::RemoterFactoryPtr remoter_factory_; | 1235 media::mojom::RemoterFactoryPtr remoter_factory_; |
| 1236 | |
| 1221 // An observer for the remoting sink availability that is used by | 1237 // An observer for the remoting sink availability that is used by |
| 1222 // media::RemotingCdmFactory to initialize media::RemotingSourceImpl. Created | 1238 // media::RemotingCdmFactory to initialize media::RemotingSourceImpl. Created |
| 1223 // in the constructor of RenderFrameImpl to make sure | 1239 // in the constructor of RenderFrameImpl to make sure |
| 1224 // media::RemotingSourceImpl be intialized with correct availability info. | 1240 // media::RemotingSourceImpl be intialized with correct availability info. |
| 1225 // Own by media::RemotingCdmFactory after it is created. | 1241 // Own by media::RemotingCdmFactory after it is created. |
| 1226 std::unique_ptr<media::RemotingSinkObserver> remoting_sink_observer_; | 1242 std::unique_ptr<media::RemotingSinkObserver> remoting_sink_observer_; |
| 1243 | |
| 1244 // The downloader used to download poster image, lazily initialized. | |
| 1245 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.
| |
| 1227 #endif | 1246 #endif |
| 1228 | 1247 |
| 1229 // The CDM and decoder factory attached to this frame, lazily initialized. | 1248 // The CDM and decoder factory attached to this frame, lazily initialized. |
| 1230 std::unique_ptr<media::CdmFactory> cdm_factory_; | 1249 std::unique_ptr<media::CdmFactory> cdm_factory_; |
| 1231 std::unique_ptr<media::DecoderFactory> decoder_factory_; | 1250 std::unique_ptr<media::DecoderFactory> decoder_factory_; |
| 1232 | 1251 |
| 1233 // Media resource cache, lazily initialized. | 1252 // Media resource cache, lazily initialized. |
| 1234 linked_ptr<media::UrlIndex> url_index_; | 1253 linked_ptr<media::UrlIndex> url_index_; |
| 1235 | 1254 |
| 1236 // The devtools agent for this frame; only created for main frame and | 1255 // The devtools agent for this frame; only created for main frame and |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1341 bool browser_side_navigation_pending_ = false; | 1360 bool browser_side_navigation_pending_ = false; |
| 1342 | 1361 |
| 1343 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; | 1362 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; |
| 1344 | 1363 |
| 1345 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); | 1364 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); |
| 1346 }; | 1365 }; |
| 1347 | 1366 |
| 1348 } // namespace content | 1367 } // namespace content |
| 1349 | 1368 |
| 1350 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 1369 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
| OLD | NEW |