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

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: use wrap 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 #include "content/renderer/effective_connection_type_helper.h" 92 #include "content/renderer/effective_connection_type_helper.h"
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/image_downloader/image_downloader_impl.h" 97 #include "content/renderer/image_downloader/image_downloader_impl.h"
98 #include "content/renderer/ime_event_guard.h" 98 #include "content/renderer/ime_event_guard.h"
99 #include "content/renderer/internal_document_state_data.h" 99 #include "content/renderer/internal_document_state_data.h"
100 #include "content/renderer/manifest/manifest_manager.h" 100 #include "content/renderer/manifest/manifest_manager.h"
101 #include "content/renderer/media/audio_device_factory.h" 101 #include "content/renderer/media/audio_device_factory.h"
102 #include "content/renderer/media/audio_message_filter.h"
102 #include "content/renderer/media/media_permission_dispatcher.h" 103 #include "content/renderer/media/media_permission_dispatcher.h"
103 #include "content/renderer/media/media_stream_dispatcher.h" 104 #include "content/renderer/media/media_stream_dispatcher.h"
104 #include "content/renderer/media/media_stream_renderer_factory_impl.h" 105 #include "content/renderer/media/media_stream_renderer_factory_impl.h"
105 #include "content/renderer/media/midi_dispatcher.h" 106 #include "content/renderer/media/midi_dispatcher.h"
106 #include "content/renderer/media/render_media_log.h" 107 #include "content/renderer/media/render_media_log.h"
107 #include "content/renderer/media/renderer_webmediaplayer_delegate.h" 108 #include "content/renderer/media/renderer_webmediaplayer_delegate.h"
108 #include "content/renderer/media/user_media_client_impl.h" 109 #include "content/renderer/media/user_media_client_impl.h"
109 #include "content/renderer/media/web_media_element_source_utils.h" 110 #include "content/renderer/media/web_media_element_source_utils.h"
110 #include "content/renderer/media/webmediaplayer_ms.h" 111 #include "content/renderer/media/webmediaplayer_ms.h"
111 #include "content/renderer/mojo/service_registry_js_wrapper.h" 112 #include "content/renderer/mojo/service_registry_js_wrapper.h"
(...skipping 5954 matching lines...) Expand 10 before | Expand all | Expand 10 after
6066 #endif 6067 #endif
6067 return decoder_factory_.get(); 6068 return decoder_factory_.get();
6068 } 6069 }
6069 6070
6070 void RenderFrameImpl::RegisterMojoServices() { 6071 void RenderFrameImpl::RegisterMojoServices() {
6071 // Only main frame have ImageDownloader service. 6072 // Only main frame have ImageDownloader service.
6072 if (!frame_->parent()) { 6073 if (!frame_->parent()) {
6073 GetServiceRegistry()->AddService(base::Bind( 6074 GetServiceRegistry()->AddService(base::Bind(
6074 &ImageDownloaderImpl::CreateMojoService, base::Unretained(this))); 6075 &ImageDownloaderImpl::CreateMojoService, base::Unretained(this)));
6075 } 6076 }
6077
6078 AudioMessageFilter::Get()->set_audio_output_client(
6079 routing_id_, new AudioOutputClient(GetServiceRegistry()));
6076 } 6080 }
6077 6081
6078 template <typename Interface> 6082 template <typename Interface>
6079 void RenderFrameImpl::GetInterface(mojo::InterfaceRequest<Interface> request) { 6083 void RenderFrameImpl::GetInterface(mojo::InterfaceRequest<Interface> request) {
6080 GetServiceRegistry()->ConnectToRemoteService(std::move(request)); 6084 GetServiceRegistry()->ConnectToRemoteService(std::move(request));
6081 } 6085 }
6082 6086
6083 shell::mojom::InterfaceProviderPtr RenderFrameImpl::ConnectToApplication( 6087 shell::mojom::InterfaceProviderPtr RenderFrameImpl::ConnectToApplication(
6084 const GURL& url) { 6088 const GURL& url) {
6085 if (!connector_) 6089 if (!connector_)
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
6193 // event target. Potentially a Pepper plugin will receive the event. 6197 // event target. Potentially a Pepper plugin will receive the event.
6194 // In order to tell whether a plugin gets the last mouse event and which it 6198 // In order to tell whether a plugin gets the last mouse event and which it
6195 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6199 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6196 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6200 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6197 // |pepper_last_mouse_event_target_|. 6201 // |pepper_last_mouse_event_target_|.
6198 pepper_last_mouse_event_target_ = nullptr; 6202 pepper_last_mouse_event_target_ = nullptr;
6199 #endif 6203 #endif
6200 } 6204 }
6201 6205
6202 } // namespace content 6206 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698