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

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

Issue 54573002: Initial child-process side plumbing for starting an embedded ServiceWorker context (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updated Created 7 years, 1 month 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 | Annotate | Revision Log
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 #include "content/renderer/render_thread_impl.h" 5 #include "content/renderer/render_thread_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 18 matching lines...) Expand all
29 #include "content/child/appcache/appcache_dispatcher.h" 29 #include "content/child/appcache/appcache_dispatcher.h"
30 #include "content/child/appcache/appcache_frontend_impl.h" 30 #include "content/child/appcache/appcache_frontend_impl.h"
31 #include "content/child/child_histogram_message_filter.h" 31 #include "content/child/child_histogram_message_filter.h"
32 #include "content/child/db_message_filter.h" 32 #include "content/child/db_message_filter.h"
33 #include "content/child/indexed_db/indexed_db_dispatcher.h" 33 #include "content/child/indexed_db/indexed_db_dispatcher.h"
34 #include "content/child/indexed_db/indexed_db_message_filter.h" 34 #include "content/child/indexed_db/indexed_db_message_filter.h"
35 #include "content/child/npapi/npobject_util.h" 35 #include "content/child/npapi/npobject_util.h"
36 #include "content/child/plugin_messages.h" 36 #include "content/child/plugin_messages.h"
37 #include "content/child/resource_dispatcher.h" 37 #include "content/child/resource_dispatcher.h"
38 #include "content/child/runtime_features.h" 38 #include "content/child/runtime_features.h"
39 #include "content/child/service_worker/embedded_worker_dispatcher.h"
39 #include "content/child/thread_safe_sender.h" 40 #include "content/child/thread_safe_sender.h"
40 #include "content/child/web_database_observer_impl.h" 41 #include "content/child/web_database_observer_impl.h"
41 #include "content/common/child_process_messages.h" 42 #include "content/common/child_process_messages.h"
42 #include "content/common/content_constants_internal.h" 43 #include "content/common/content_constants_internal.h"
43 #include "content/common/database_messages.h" 44 #include "content/common/database_messages.h"
44 #include "content/common/dom_storage/dom_storage_messages.h" 45 #include "content/common/dom_storage/dom_storage_messages.h"
45 #include "content/common/gpu/client/context_provider_command_buffer.h" 46 #include "content/common/gpu/client/context_provider_command_buffer.h"
46 #include "content/common/gpu/client/gpu_channel_host.h" 47 #include "content/common/gpu/client/gpu_channel_host.h"
47 #include "content/common/gpu/client/gpu_memory_buffer_impl.h" 48 #include "content/common/gpu/client/gpu_memory_buffer_impl.h"
48 #include "content/common/gpu/gpu_messages.h" 49 #include "content/common/gpu/gpu_messages.h"
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 idle_notification_delay_in_ms_ = kInitialIdleHandlerDelayMs; 336 idle_notification_delay_in_ms_ = kInitialIdleHandlerDelayMs;
336 idle_notifications_to_skip_ = 0; 337 idle_notifications_to_skip_ = 0;
337 layout_test_mode_ = false; 338 layout_test_mode_ = false;
338 shutdown_event_ = NULL; 339 shutdown_event_ = NULL;
339 340
340 appcache_dispatcher_.reset( 341 appcache_dispatcher_.reset(
341 new AppCacheDispatcher(Get(), new AppCacheFrontendImpl())); 342 new AppCacheDispatcher(Get(), new AppCacheFrontendImpl()));
342 dom_storage_dispatcher_.reset(new DomStorageDispatcher()); 343 dom_storage_dispatcher_.reset(new DomStorageDispatcher());
343 main_thread_indexed_db_dispatcher_.reset(new IndexedDBDispatcher( 344 main_thread_indexed_db_dispatcher_.reset(new IndexedDBDispatcher(
344 thread_safe_sender())); 345 thread_safe_sender()));
346 embedded_worker_dispatcher_.reset(new EmbeddedWorkerDispatcher());
345 347
346 media_stream_center_ = NULL; 348 media_stream_center_ = NULL;
347 349
348 db_message_filter_ = new DBMessageFilter(); 350 db_message_filter_ = new DBMessageFilter();
349 AddFilter(db_message_filter_.get()); 351 AddFilter(db_message_filter_.get());
350 352
351 #if defined(ENABLE_WEBRTC) 353 #if defined(ENABLE_WEBRTC)
352 peer_connection_tracker_.reset(new PeerConnectionTracker()); 354 peer_connection_tracker_.reset(new PeerConnectionTracker());
353 AddObserver(peer_connection_tracker_.get()); 355 AddObserver(peer_connection_tracker_.get());
354 356
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after
1116 bool RenderThreadImpl::OnControlMessageReceived(const IPC::Message& msg) { 1118 bool RenderThreadImpl::OnControlMessageReceived(const IPC::Message& msg) {
1117 ObserverListBase<RenderProcessObserver>::Iterator it(observers_); 1119 ObserverListBase<RenderProcessObserver>::Iterator it(observers_);
1118 RenderProcessObserver* observer; 1120 RenderProcessObserver* observer;
1119 while ((observer = it.GetNext()) != NULL) { 1121 while ((observer = it.GetNext()) != NULL) {
1120 if (observer->OnControlMessageReceived(msg)) 1122 if (observer->OnControlMessageReceived(msg))
1121 return true; 1123 return true;
1122 } 1124 }
1123 1125
1124 // Some messages are handled by delegates. 1126 // Some messages are handled by delegates.
1125 if (appcache_dispatcher_->OnMessageReceived(msg) || 1127 if (appcache_dispatcher_->OnMessageReceived(msg) ||
1126 dom_storage_dispatcher_->OnMessageReceived(msg)) { 1128 dom_storage_dispatcher_->OnMessageReceived(msg) ||
1129 embedded_worker_dispatcher_->OnMessageReceived(msg)) {
1127 return true; 1130 return true;
1128 } 1131 }
1129 1132
1130 bool handled = true; 1133 bool handled = true;
1131 IPC_BEGIN_MESSAGE_MAP(RenderThreadImpl, msg) 1134 IPC_BEGIN_MESSAGE_MAP(RenderThreadImpl, msg)
1132 IPC_MESSAGE_HANDLER(ViewMsg_SetZoomLevelForCurrentURL, 1135 IPC_MESSAGE_HANDLER(ViewMsg_SetZoomLevelForCurrentURL,
1133 OnSetZoomLevelForCurrentURL) 1136 OnSetZoomLevelForCurrentURL)
1134 // TODO(port): removed from render_messages_internal.h; 1137 // TODO(port): removed from render_messages_internal.h;
1135 // is there a new non-windows message I should add here? 1138 // is there a new non-windows message I should add here?
1136 IPC_MESSAGE_HANDLER(ViewMsg_New, OnCreateNewView) 1139 IPC_MESSAGE_HANDLER(ViewMsg_New, OnCreateNewView)
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
1341 if (!gamepad_shared_memory_reader_) 1344 if (!gamepad_shared_memory_reader_)
1342 gamepad_shared_memory_reader_.reset(new GamepadSharedMemoryReader); 1345 gamepad_shared_memory_reader_.reset(new GamepadSharedMemoryReader);
1343 gamepad_shared_memory_reader_->SampleGamepads(*data); 1346 gamepad_shared_memory_reader_->SampleGamepads(*data);
1344 } 1347 }
1345 1348
1346 base::ProcessId RenderThreadImpl::renderer_process_id() const { 1349 base::ProcessId RenderThreadImpl::renderer_process_id() const {
1347 return renderer_process_id_; 1350 return renderer_process_id_;
1348 } 1351 }
1349 1352
1350 } // namespace content 1353 } // namespace content
OLDNEW
« content/child/service_worker/embedded_worker_stub.cc ('K') | « content/renderer/render_thread_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698