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

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 636863003: Make SpeechRecognition per RenderFrame instead of per RenderView. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixes threading issues Created 6 years 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Represents the browser side of the browser <--> renderer communication 5 // Represents the browser side of the browser <--> renderer communication
6 // channel. There will be one RenderProcessHost per renderer process. 6 // channel. There will be one RenderProcessHost per renderer process.
7 7
8 #include "content/browser/renderer_host/render_process_host_impl.h" 8 #include "content/browser/renderer_host/render_process_host_impl.h"
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 #include "content/browser/renderer_host/render_view_host_impl.h" 91 #include "content/browser/renderer_host/render_view_host_impl.h"
92 #include "content/browser/renderer_host/render_widget_helper.h" 92 #include "content/browser/renderer_host/render_widget_helper.h"
93 #include "content/browser/renderer_host/render_widget_host_impl.h" 93 #include "content/browser/renderer_host/render_widget_host_impl.h"
94 #include "content/browser/renderer_host/text_input_client_message_filter.h" 94 #include "content/browser/renderer_host/text_input_client_message_filter.h"
95 #include "content/browser/renderer_host/websocket_dispatcher_host.h" 95 #include "content/browser/renderer_host/websocket_dispatcher_host.h"
96 #include "content/browser/resolve_proxy_msg_helper.h" 96 #include "content/browser/resolve_proxy_msg_helper.h"
97 #include "content/browser/service_worker/service_worker_context_wrapper.h" 97 #include "content/browser/service_worker/service_worker_context_wrapper.h"
98 #include "content/browser/service_worker/service_worker_dispatcher_host.h" 98 #include "content/browser/service_worker/service_worker_dispatcher_host.h"
99 #include "content/browser/shared_worker/shared_worker_message_filter.h" 99 #include "content/browser/shared_worker/shared_worker_message_filter.h"
100 #include "content/browser/shared_worker/worker_storage_partition.h" 100 #include "content/browser/shared_worker/worker_storage_partition.h"
101 #include "content/browser/speech/speech_recognition_dispatcher_host.h"
102 #include "content/browser/storage_partition_impl.h" 101 #include "content/browser/storage_partition_impl.h"
103 #include "content/browser/streams/stream_context.h" 102 #include "content/browser/streams/stream_context.h"
104 #include "content/browser/tracing/trace_message_filter.h" 103 #include "content/browser/tracing/trace_message_filter.h"
105 #include "content/browser/vibration/vibration_message_filter.h" 104 #include "content/browser/vibration/vibration_message_filter.h"
106 #include "content/browser/webui/web_ui_controller_factory_registry.h" 105 #include "content/browser/webui/web_ui_controller_factory_registry.h"
107 #include "content/common/child_process_host_impl.h" 106 #include "content/common/child_process_host_impl.h"
108 #include "content/common/child_process_messages.h" 107 #include "content/common/child_process_messages.h"
109 #include "content/common/content_switches_internal.h" 108 #include "content/common/content_switches_internal.h"
110 #include "content/common/gpu/gpu_memory_buffer_factory.h" 109 #include "content/common/gpu/gpu_memory_buffer_factory.h"
111 #include "content/common/gpu/gpu_messages.h" 110 #include "content/common/gpu/gpu_messages.h"
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
769 AddFilter(peer_connection_tracker_host_.get()); 768 AddFilter(peer_connection_tracker_host_.get());
770 AddFilter(new MediaStreamDispatcherHost( 769 AddFilter(new MediaStreamDispatcherHost(
771 GetID(), 770 GetID(),
772 browser_context->GetResourceContext()->GetMediaDeviceIDSalt(), 771 browser_context->GetResourceContext()->GetMediaDeviceIDSalt(),
773 media_stream_manager)); 772 media_stream_manager));
774 AddFilter(new MediaStreamTrackMetricsHost()); 773 AddFilter(new MediaStreamTrackMetricsHost());
775 #endif 774 #endif
776 #if defined(ENABLE_PLUGINS) 775 #if defined(ENABLE_PLUGINS)
777 AddFilter(new PepperRendererConnection(GetID())); 776 AddFilter(new PepperRendererConnection(GetID()));
778 #endif 777 #endif
779 AddFilter(new SpeechRecognitionDispatcherHost(
780 GetID(), storage_partition_impl_->GetURLRequestContext()));
781 AddFilter(new FileAPIMessageFilter( 778 AddFilter(new FileAPIMessageFilter(
782 GetID(), 779 GetID(),
783 storage_partition_impl_->GetURLRequestContext(), 780 storage_partition_impl_->GetURLRequestContext(),
784 storage_partition_impl_->GetFileSystemContext(), 781 storage_partition_impl_->GetFileSystemContext(),
785 ChromeBlobStorageContext::GetFor(browser_context), 782 ChromeBlobStorageContext::GetFor(browser_context),
786 StreamContext::GetFor(browser_context))); 783 StreamContext::GetFor(browser_context)));
787 AddFilter(new FileUtilitiesMessageFilter(GetID())); 784 AddFilter(new FileUtilitiesMessageFilter(GetID()));
788 AddFilter(new MimeRegistryMessageFilter()); 785 AddFilter(new MimeRegistryMessageFilter());
789 AddFilter(new DatabaseMessageFilter( 786 AddFilter(new DatabaseMessageFilter(
790 storage_partition_impl_->GetDatabaseTracker())); 787 storage_partition_impl_->GetDatabaseTracker()));
(...skipping 1479 matching lines...) Expand 10 before | Expand all | Expand 10 after
2270 2267
2271 void RenderProcessHostImpl::DecrementWorkerRefCount() { 2268 void RenderProcessHostImpl::DecrementWorkerRefCount() {
2272 DCHECK_CURRENTLY_ON(BrowserThread::UI); 2269 DCHECK_CURRENTLY_ON(BrowserThread::UI);
2273 DCHECK_GT(worker_ref_count_, 0); 2270 DCHECK_GT(worker_ref_count_, 0);
2274 --worker_ref_count_; 2271 --worker_ref_count_;
2275 if (worker_ref_count_ == 0) 2272 if (worker_ref_count_ == 0)
2276 Cleanup(); 2273 Cleanup();
2277 } 2274 }
2278 2275
2279 } // namespace content 2276 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698