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

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

Issue 1930393002: Switch stream creation and closing in Chrome audio rendering from IPC to Mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unique_ptr for Binding Created 4 years, 6 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 #include "content/renderer/render_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 #include "content/renderer/external_popup_menu.h" 93 #include "content/renderer/external_popup_menu.h"
94 #include "content/renderer/gpu/gpu_benchmarking_extension.h" 94 #include "content/renderer/gpu/gpu_benchmarking_extension.h"
95 #include "content/renderer/history_controller.h" 95 #include "content/renderer/history_controller.h"
96 #include "content/renderer/history_serialization.h" 96 #include "content/renderer/history_serialization.h"
97 #include "content/renderer/http_body_conversions.h" 97 #include "content/renderer/http_body_conversions.h"
98 #include "content/renderer/image_downloader/image_downloader_impl.h" 98 #include "content/renderer/image_downloader/image_downloader_impl.h"
99 #include "content/renderer/ime_event_guard.h" 99 #include "content/renderer/ime_event_guard.h"
100 #include "content/renderer/internal_document_state_data.h" 100 #include "content/renderer/internal_document_state_data.h"
101 #include "content/renderer/manifest/manifest_manager.h" 101 #include "content/renderer/manifest/manifest_manager.h"
102 #include "content/renderer/media/audio_device_factory.h" 102 #include "content/renderer/media/audio_device_factory.h"
103 #include "content/renderer/media/audio_message_filter.h"
103 #include "content/renderer/media/media_permission_dispatcher.h" 104 #include "content/renderer/media/media_permission_dispatcher.h"
104 #include "content/renderer/media/media_stream_dispatcher.h" 105 #include "content/renderer/media/media_stream_dispatcher.h"
105 #include "content/renderer/media/media_stream_renderer_factory_impl.h" 106 #include "content/renderer/media/media_stream_renderer_factory_impl.h"
106 #include "content/renderer/media/midi_dispatcher.h" 107 #include "content/renderer/media/midi_dispatcher.h"
107 #include "content/renderer/media/render_media_log.h" 108 #include "content/renderer/media/render_media_log.h"
108 #include "content/renderer/media/renderer_webmediaplayer_delegate.h" 109 #include "content/renderer/media/renderer_webmediaplayer_delegate.h"
109 #include "content/renderer/media/user_media_client_impl.h" 110 #include "content/renderer/media/user_media_client_impl.h"
110 #include "content/renderer/media/web_media_element_source_utils.h" 111 #include "content/renderer/media/web_media_element_source_utils.h"
111 #include "content/renderer/media/webmediaplayer_ms.h" 112 #include "content/renderer/media/webmediaplayer_ms.h"
112 #include "content/renderer/mojo/service_registry_js_wrapper.h" 113 #include "content/renderer/mojo/service_registry_js_wrapper.h"
(...skipping 5913 matching lines...) Expand 10 before | Expand all | Expand 10 after
6026 #endif 6027 #endif
6027 return decoder_factory_.get(); 6028 return decoder_factory_.get();
6028 } 6029 }
6029 6030
6030 void RenderFrameImpl::RegisterMojoServices() { 6031 void RenderFrameImpl::RegisterMojoServices() {
6031 // Only main frame have ImageDownloader service. 6032 // Only main frame have ImageDownloader service.
6032 if (!frame_->parent()) { 6033 if (!frame_->parent()) {
6033 GetServiceRegistry()->AddService(base::Bind( 6034 GetServiceRegistry()->AddService(base::Bind(
6034 &ImageDownloaderImpl::CreateMojoService, base::Unretained(this))); 6035 &ImageDownloaderImpl::CreateMojoService, base::Unretained(this)));
6035 } 6036 }
6037 if (AudioMessageFilter::Get())
6038 AudioMessageFilter::Get()->RegisterAudioOutputClient(
6039 routing_id_, new AudioOutputClient(GetServiceRegistry()));
6036 } 6040 }
6037 6041
6038 template <typename Interface> 6042 template <typename Interface>
6039 void RenderFrameImpl::GetInterface(mojo::InterfaceRequest<Interface> request) { 6043 void RenderFrameImpl::GetInterface(mojo::InterfaceRequest<Interface> request) {
6040 GetServiceRegistry()->ConnectToRemoteService(std::move(request)); 6044 GetServiceRegistry()->ConnectToRemoteService(std::move(request));
6041 } 6045 }
6042 6046
6043 shell::mojom::InterfaceProviderPtr RenderFrameImpl::ConnectToApplication( 6047 shell::mojom::InterfaceProviderPtr RenderFrameImpl::ConnectToApplication(
6044 const GURL& url) { 6048 const GURL& url) {
6045 if (!connector_) 6049 if (!connector_)
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
6153 // event target. Potentially a Pepper plugin will receive the event. 6157 // event target. Potentially a Pepper plugin will receive the event.
6154 // In order to tell whether a plugin gets the last mouse event and which it 6158 // In order to tell whether a plugin gets the last mouse event and which it
6155 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6159 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6156 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6160 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6157 // |pepper_last_mouse_event_target_|. 6161 // |pepper_last_mouse_event_target_|.
6158 pepper_last_mouse_event_target_ = nullptr; 6162 pepper_last_mouse_event_target_ = nullptr;
6159 #endif 6163 #endif
6160 } 6164 }
6161 6165
6162 } // namespace content 6166 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/audio_output_client_unittest.cc ('k') | media/mojo/interfaces/mojo_bindings.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698