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

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

Issue 2821203005: Add a mojo implementation of AudioOutputIPC. (Closed)
Patch Set: Comments. SWITCH TO MACRO-BASED THREAD CHECKER. Created 3 years, 7 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 #include "content/common/clipboard_messages.h" 56 #include "content/common/clipboard_messages.h"
57 #include "content/common/content_constants_internal.h" 57 #include "content/common/content_constants_internal.h"
58 #include "content/common/content_security_policy/csp_context.h" 58 #include "content/common/content_security_policy/csp_context.h"
59 #include "content/common/content_security_policy_header.h" 59 #include "content/common/content_security_policy_header.h"
60 #include "content/common/download/mhtml_save_status.h" 60 #include "content/common/download/mhtml_save_status.h"
61 #include "content/common/edit_command.h" 61 #include "content/common/edit_command.h"
62 #include "content/common/frame_messages.h" 62 #include "content/common/frame_messages.h"
63 #include "content/common/frame_owner_properties.h" 63 #include "content/common/frame_owner_properties.h"
64 #include "content/common/frame_replication_state.h" 64 #include "content/common/frame_replication_state.h"
65 #include "content/common/input_messages.h" 65 #include "content/common/input_messages.h"
66 #include "content/common/media/renderer_audio_output_stream_factory.mojom.h"
66 #include "content/common/navigation_params.h" 67 #include "content/common/navigation_params.h"
67 #include "content/common/page_messages.h" 68 #include "content/common/page_messages.h"
68 #include "content/common/savable_subframe.h" 69 #include "content/common/savable_subframe.h"
69 #include "content/common/service_worker/service_worker_types.h" 70 #include "content/common/service_worker/service_worker_types.h"
70 #include "content/common/site_isolation_policy.h" 71 #include "content/common/site_isolation_policy.h"
71 #include "content/common/swapped_out_messages.h" 72 #include "content/common/swapped_out_messages.h"
72 #include "content/common/view_messages.h" 73 #include "content/common/view_messages.h"
73 #include "content/common/worker_url_loader_factory_provider.mojom.h" 74 #include "content/common/worker_url_loader_factory_provider.mojom.h"
74 #include "content/public/common/appcache_info.h" 75 #include "content/public/common/appcache_info.h"
75 #include "content/public/common/associated_interface_provider.h" 76 #include "content/public/common/associated_interface_provider.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 #include "content/renderer/gpu/gpu_benchmarking_extension.h" 110 #include "content/renderer/gpu/gpu_benchmarking_extension.h"
110 #include "content/renderer/history_entry.h" 111 #include "content/renderer/history_entry.h"
111 #include "content/renderer/history_serialization.h" 112 #include "content/renderer/history_serialization.h"
112 #include "content/renderer/image_downloader/image_downloader_impl.h" 113 #include "content/renderer/image_downloader/image_downloader_impl.h"
113 #include "content/renderer/ime_event_guard.h" 114 #include "content/renderer/ime_event_guard.h"
114 #include "content/renderer/input/input_handler_manager.h" 115 #include "content/renderer/input/input_handler_manager.h"
115 #include "content/renderer/installedapp/related_apps_fetcher.h" 116 #include "content/renderer/installedapp/related_apps_fetcher.h"
116 #include "content/renderer/internal_document_state_data.h" 117 #include "content/renderer/internal_document_state_data.h"
117 #include "content/renderer/manifest/manifest_manager.h" 118 #include "content/renderer/manifest/manifest_manager.h"
118 #include "content/renderer/media/audio_device_factory.h" 119 #include "content/renderer/media/audio_device_factory.h"
120 #include "content/renderer/media/audio_ipc_factory.h"
119 #include "content/renderer/media/media_devices_listener_impl.h" 121 #include "content/renderer/media/media_devices_listener_impl.h"
120 #include "content/renderer/media/media_permission_dispatcher.h" 122 #include "content/renderer/media/media_permission_dispatcher.h"
121 #include "content/renderer/media/media_stream_dispatcher.h" 123 #include "content/renderer/media/media_stream_dispatcher.h"
122 #include "content/renderer/media/media_stream_renderer_factory_impl.h" 124 #include "content/renderer/media/media_stream_renderer_factory_impl.h"
123 #include "content/renderer/media/render_media_log.h" 125 #include "content/renderer/media/render_media_log.h"
124 #include "content/renderer/media/renderer_webmediaplayer_delegate.h" 126 #include "content/renderer/media/renderer_webmediaplayer_delegate.h"
125 #include "content/renderer/media/user_media_client_impl.h" 127 #include "content/renderer/media/user_media_client_impl.h"
126 #include "content/renderer/media/web_media_element_source_utils.h" 128 #include "content/renderer/media/web_media_element_source_utils.h"
127 #include "content/renderer/media/webmediaplayer_ms.h" 129 #include "content/renderer/media/webmediaplayer_ms.h"
128 #include "content/renderer/mojo/blink_connector_js_wrapper.h" 130 #include "content/renderer/mojo/blink_connector_js_wrapper.h"
(...skipping 1087 matching lines...) Expand 10 before | Expand all | Expand 10 after
1216 1218
1217 base::trace_event::TraceLog::GetInstance()->RemoveProcessLabel(routing_id_); 1219 base::trace_event::TraceLog::GetInstance()->RemoveProcessLabel(routing_id_);
1218 1220
1219 // Unregister from InputHandlerManager. render_thread may be NULL in tests. 1221 // Unregister from InputHandlerManager. render_thread may be NULL in tests.
1220 RenderThreadImpl* render_thread = RenderThreadImpl::current(); 1222 RenderThreadImpl* render_thread = RenderThreadImpl::current();
1221 InputHandlerManager* input_handler_manager = 1223 InputHandlerManager* input_handler_manager =
1222 render_thread ? render_thread->input_handler_manager() : nullptr; 1224 render_thread ? render_thread->input_handler_manager() : nullptr;
1223 if (input_handler_manager) 1225 if (input_handler_manager)
1224 input_handler_manager->UnregisterRoutingID(GetRoutingID()); 1226 input_handler_manager->UnregisterRoutingID(GetRoutingID());
1225 1227
1228 if (AudioIPCFactory::get())
1229 AudioIPCFactory::get()->MaybeDeregisterRemoteFactory(GetRoutingID());
1230
1226 if (is_main_frame_) { 1231 if (is_main_frame_) {
1227 // Ensure the RenderView doesn't point to this object, once it is destroyed. 1232 // Ensure the RenderView doesn't point to this object, once it is destroyed.
1228 // TODO(nasko): Add a check that the |main_render_frame_| of |render_view_| 1233 // TODO(nasko): Add a check that the |main_render_frame_| of |render_view_|
1229 // is |this|, once the object is no longer leaked. 1234 // is |this|, once the object is no longer leaked.
1230 // See https://crbug.com/464764. 1235 // See https://crbug.com/464764.
1231 render_view_->main_render_frame_ = nullptr; 1236 render_view_->main_render_frame_ = nullptr;
1232 } 1237 }
1233 1238
1234 render_view_->UnregisterRenderFrame(this); 1239 render_view_->UnregisterRenderFrame(this);
1235 g_routing_id_frame_map.Get().erase(routing_id_); 1240 g_routing_id_frame_map.Get().erase(routing_id_);
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
1289 RenderThreadImpl* render_thread = RenderThreadImpl::current(); 1294 RenderThreadImpl* render_thread = RenderThreadImpl::current();
1290 // render_thread may be NULL in tests. 1295 // render_thread may be NULL in tests.
1291 InputHandlerManager* input_handler_manager = 1296 InputHandlerManager* input_handler_manager =
1292 render_thread ? render_thread->input_handler_manager() : nullptr; 1297 render_thread ? render_thread->input_handler_manager() : nullptr;
1293 if (input_handler_manager) { 1298 if (input_handler_manager) {
1294 DCHECK(render_view_->HasAddedInputHandler()); 1299 DCHECK(render_view_->HasAddedInputHandler());
1295 input_handler_manager->RegisterAssociatedRenderFrameRoutingID( 1300 input_handler_manager->RegisterAssociatedRenderFrameRoutingID(
1296 GetRoutingID(), render_view_->GetRoutingID()); 1301 GetRoutingID(), render_view_->GetRoutingID());
1297 } 1302 }
1298 1303
1304 // AudioIPCFactory may be null in tests.
1305 if (AudioIPCFactory::get()) {
1306 AudioIPCFactory::get()->MaybeRegisterRemoteFactory(GetRoutingID(),
1307 GetRemoteInterfaces());
1308 }
1309
1299 const base::CommandLine& command_line = 1310 const base::CommandLine& command_line =
1300 *base::CommandLine::ForCurrentProcess(); 1311 *base::CommandLine::ForCurrentProcess();
1301 if (command_line.HasSwitch(switches::kDomAutomationController)) 1312 if (command_line.HasSwitch(switches::kDomAutomationController))
1302 enabled_bindings_ |= BINDINGS_POLICY_DOM_AUTOMATION; 1313 enabled_bindings_ |= BINDINGS_POLICY_DOM_AUTOMATION;
1303 if (command_line.HasSwitch(switches::kStatsCollectionController)) 1314 if (command_line.HasSwitch(switches::kStatsCollectionController))
1304 enabled_bindings_ |= BINDINGS_POLICY_STATS_COLLECTION; 1315 enabled_bindings_ |= BINDINGS_POLICY_STATS_COLLECTION;
1305 } 1316 }
1306 1317
1307 void RenderFrameImpl::InitializeBlameContext(RenderFrameImpl* parent_frame) { 1318 void RenderFrameImpl::InitializeBlameContext(RenderFrameImpl* parent_frame) {
1308 DCHECK(!blame_context_); 1319 DCHECK(!blame_context_);
(...skipping 5766 matching lines...) Expand 10 before | Expand all | Expand 10 after
7075 policy(info.default_policy), 7086 policy(info.default_policy),
7076 replaces_current_history_item(info.replaces_current_history_item), 7087 replaces_current_history_item(info.replaces_current_history_item),
7077 history_navigation_in_new_child_frame( 7088 history_navigation_in_new_child_frame(
7078 info.is_history_navigation_in_new_child_frame), 7089 info.is_history_navigation_in_new_child_frame),
7079 client_redirect(info.is_client_redirect), 7090 client_redirect(info.is_client_redirect),
7080 cache_disabled(info.is_cache_disabled), 7091 cache_disabled(info.is_cache_disabled),
7081 form(info.form), 7092 form(info.form),
7082 source_location(info.source_location) {} 7093 source_location(info.source_location) {}
7083 7094
7084 } // namespace content 7095 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698