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

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

Issue 1464183002: media: Simplify MediaPermissionDispatcher. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix rebase errors Created 4 years, 10 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 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 class ChildFrameCompositingHelper; 113 class ChildFrameCompositingHelper;
114 class CompositorDependencies; 114 class CompositorDependencies;
115 class DevToolsAgent; 115 class DevToolsAgent;
116 class DocumentState; 116 class DocumentState;
117 class ExternalPopupMenu; 117 class ExternalPopupMenu;
118 class GeolocationDispatcher; 118 class GeolocationDispatcher;
119 class ManifestManager; 119 class ManifestManager;
120 class MediaStreamDispatcher; 120 class MediaStreamDispatcher;
121 class MediaStreamRendererFactory; 121 class MediaStreamRendererFactory;
122 class MediaPermissionDispatcherImpl; 122 class MediaPermissionDispatcher;
123 class MidiDispatcher; 123 class MidiDispatcher;
124 class NavigationState; 124 class NavigationState;
125 class NotificationPermissionDispatcher; 125 class NotificationPermissionDispatcher;
126 class PageState; 126 class PageState;
127 class PepperPluginInstanceImpl; 127 class PepperPluginInstanceImpl;
128 class PermissionDispatcher; 128 class PermissionDispatcher;
129 class PresentationDispatcher; 129 class PresentationDispatcher;
130 class PushMessagingDispatcher; 130 class PushMessagingDispatcher;
131 class RendererAccessibility; 131 class RendererAccessibility;
132 class RendererCdmManager; 132 class RendererCdmManager;
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 mojo::InterfaceRequest<mojo::ServiceProvider> services, 638 mojo::InterfaceRequest<mojo::ServiceProvider> services,
639 mojo::ServiceProviderPtr exposed_services); 639 mojo::ServiceProviderPtr exposed_services);
640 640
641 ManifestManager* manifest_manager(); 641 ManifestManager* manifest_manager();
642 642
643 // TODO(creis): Remove when the only caller, the HistoryController, is no 643 // TODO(creis): Remove when the only caller, the HistoryController, is no
644 // more. 644 // more.
645 void SetPendingNavigationParams( 645 void SetPendingNavigationParams(
646 scoped_ptr<NavigationParams> navigation_params); 646 scoped_ptr<NavigationParams> navigation_params);
647 647
648 // Expose MediaPermission to the non-UI threads. Any calls to this will be 648 media::MediaPermission* GetMediaPermission();
649 // redirected to |media_permission_dispatcher_| on UI thread and have the
650 // callback called on |caller_task_runner|.
651 scoped_ptr<media::MediaPermission> CreateMediaPermissionProxy(
652 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner);
653 649
654 // Sends the current frame's navigation state to the browser. 650 // Sends the current frame's navigation state to the browser.
655 void SendUpdateState(); 651 void SendUpdateState();
656 652
657 // Creates a MojoBindingsController to allow WebUI documents to communicate 653 // Creates a MojoBindingsController to allow WebUI documents to communicate
658 // with the browser process. If |for_layout_tests| is true, the module system 654 // with the browser process. If |for_layout_tests| is true, the module system
659 // is exposed on a global "mojo" object rather than "define". 655 // is exposed on a global "mojo" object rather than "define".
660 void EnableMojoBindings(bool for_layout_tests); 656 void EnableMojoBindings(bool for_layout_tests);
661 657
662 protected: 658 protected:
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
935 blink::WebMediaPlayerEncryptedMediaClient* encrypted_client, 931 blink::WebMediaPlayerEncryptedMediaClient* encrypted_client,
936 const media::WebMediaPlayerParams& params); 932 const media::WebMediaPlayerParams& params);
937 933
938 RendererMediaPlayerManager* GetMediaPlayerManager(); 934 RendererMediaPlayerManager* GetMediaPlayerManager();
939 935
940 RendererMediaSessionManager* GetMediaSessionManager(); 936 RendererMediaSessionManager* GetMediaSessionManager();
941 #endif 937 #endif
942 938
943 bool AreSecureCodecsSupported(); 939 bool AreSecureCodecsSupported();
944 940
945 media::MediaPermission* GetMediaPermission();
946
947 #if defined(ENABLE_MOJO_MEDIA) 941 #if defined(ENABLE_MOJO_MEDIA)
948 media::interfaces::ServiceFactory* GetMediaServiceFactory(); 942 media::interfaces::ServiceFactory* GetMediaServiceFactory();
949 943
950 // Called when a connection error happened on |media_service_factory_|. 944 // Called when a connection error happened on |media_service_factory_|.
951 void OnMediaServiceFactoryConnectionError(); 945 void OnMediaServiceFactoryConnectionError();
952 #endif 946 #endif
953 947
954 media::CdmFactory* GetCdmFactory(); 948 media::CdmFactory* GetCdmFactory();
955 949
956 void RegisterMojoServices(); 950 void RegisterMojoServices();
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
1089 // Dispatches permission requests for Web Notifications. 1083 // Dispatches permission requests for Web Notifications.
1090 NotificationPermissionDispatcher* notification_permission_dispatcher_; 1084 NotificationPermissionDispatcher* notification_permission_dispatcher_;
1091 1085
1092 // Destroyed via the RenderFrameObserver::OnDestruct() mechanism. 1086 // Destroyed via the RenderFrameObserver::OnDestruct() mechanism.
1093 UserMediaClientImpl* web_user_media_client_; 1087 UserMediaClientImpl* web_user_media_client_;
1094 1088
1095 // EncryptedMediaClient attached to this frame; lazily initialized. 1089 // EncryptedMediaClient attached to this frame; lazily initialized.
1096 scoped_ptr<media::WebEncryptedMediaClientImpl> web_encrypted_media_client_; 1090 scoped_ptr<media::WebEncryptedMediaClientImpl> web_encrypted_media_client_;
1097 1091
1098 // The media permission dispatcher attached to this frame, lazily initialized. 1092 // The media permission dispatcher attached to this frame, lazily initialized.
1099 MediaPermissionDispatcherImpl* media_permission_dispatcher_; 1093 MediaPermissionDispatcher* media_permission_dispatcher_;
Sergey Ulanov 2016/02/02 22:11:02 Should this be a scoped_ptr<>? As far as I can tel
xhwang 2016/02/03 00:17:20 (reposting a previous reply with edits) MediaPerm
Sergey Ulanov 2016/02/04 20:50:23 I see. Add a comment here? similar to web_user_med
xhwang 2016/02/04 22:35:18 Done.
1100 1094
1101 #if defined(ENABLE_MOJO_MEDIA) 1095 #if defined(ENABLE_MOJO_MEDIA)
1102 // The media factory attached to this frame, lazily initialized. 1096 // The media factory attached to this frame, lazily initialized.
1103 media::interfaces::ServiceFactoryPtr media_service_factory_; 1097 media::interfaces::ServiceFactoryPtr media_service_factory_;
1104 #endif 1098 #endif
1105 1099
1106 // MidiClient attached to this frame; lazily initialized. 1100 // MidiClient attached to this frame; lazily initialized.
1107 MidiDispatcher* midi_dispatcher_; 1101 MidiDispatcher* midi_dispatcher_;
1108 1102
1109 #if defined(OS_ANDROID) 1103 #if defined(OS_ANDROID)
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
1199 #endif 1193 #endif
1200 1194
1201 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; 1195 base::WeakPtrFactory<RenderFrameImpl> weak_factory_;
1202 1196
1203 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); 1197 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl);
1204 }; 1198 };
1205 1199
1206 } // namespace content 1200 } // namespace content
1207 1201
1208 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ 1202 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698