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

Side by Side Diff: content/child/child_thread_impl.cc

Issue 1192713004: Update client side navigator.connect API to use ServicePortCollection [2/3] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use mojo for all ServicePort related IPC Created 5 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 (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/child/child_thread_impl.h" 5 #include "content/child/child_thread_impl.h"
6 6
7 #include <signal.h> 7 #include <signal.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 24 matching lines...) Expand all
35 #include "content/child/child_discardable_shared_memory_manager.h" 35 #include "content/child/child_discardable_shared_memory_manager.h"
36 #include "content/child/child_gpu_memory_buffer_manager.h" 36 #include "content/child/child_gpu_memory_buffer_manager.h"
37 #include "content/child/child_histogram_message_filter.h" 37 #include "content/child/child_histogram_message_filter.h"
38 #include "content/child/child_process.h" 38 #include "content/child/child_process.h"
39 #include "content/child/child_resource_message_filter.h" 39 #include "content/child/child_resource_message_filter.h"
40 #include "content/child/child_shared_bitmap_manager.h" 40 #include "content/child/child_shared_bitmap_manager.h"
41 #include "content/child/fileapi/file_system_dispatcher.h" 41 #include "content/child/fileapi/file_system_dispatcher.h"
42 #include "content/child/fileapi/webfilesystem_impl.h" 42 #include "content/child/fileapi/webfilesystem_impl.h"
43 #include "content/child/geofencing/geofencing_message_filter.h" 43 #include "content/child/geofencing/geofencing_message_filter.h"
44 #include "content/child/mojo/mojo_application.h" 44 #include "content/child/mojo/mojo_application.h"
45 #include "content/child/navigator_connect/navigator_connect_dispatcher.h"
46 #include "content/child/notifications/notification_dispatcher.h" 45 #include "content/child/notifications/notification_dispatcher.h"
47 #include "content/child/power_monitor_broadcast_source.h" 46 #include "content/child/power_monitor_broadcast_source.h"
48 #include "content/child/push_messaging/push_dispatcher.h" 47 #include "content/child/push_messaging/push_dispatcher.h"
49 #include "content/child/quota_dispatcher.h" 48 #include "content/child/quota_dispatcher.h"
50 #include "content/child/quota_message_filter.h" 49 #include "content/child/quota_message_filter.h"
51 #include "content/child/resource_dispatcher.h" 50 #include "content/child/resource_dispatcher.h"
52 #include "content/child/service_worker/service_worker_message_filter.h" 51 #include "content/child/service_worker/service_worker_message_filter.h"
53 #include "content/child/thread_safe_sender.h" 52 #include "content/child/thread_safe_sender.h"
54 #include "content/child/websocket_dispatcher.h" 53 #include "content/child/websocket_dispatcher.h"
55 #include "content/common/child_process_messages.h" 54 #include "content/common/child_process_messages.h"
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 new QuotaMessageFilter(thread_safe_sender_.get()); 369 new QuotaMessageFilter(thread_safe_sender_.get());
371 quota_dispatcher_.reset(new QuotaDispatcher(thread_safe_sender_.get(), 370 quota_dispatcher_.reset(new QuotaDispatcher(thread_safe_sender_.get(),
372 quota_message_filter_.get())); 371 quota_message_filter_.get()));
373 geofencing_message_filter_ = 372 geofencing_message_filter_ =
374 new GeofencingMessageFilter(thread_safe_sender_.get()); 373 new GeofencingMessageFilter(thread_safe_sender_.get());
375 bluetooth_message_filter_ = 374 bluetooth_message_filter_ =
376 new BluetoothMessageFilter(thread_safe_sender_.get()); 375 new BluetoothMessageFilter(thread_safe_sender_.get());
377 notification_dispatcher_ = 376 notification_dispatcher_ =
378 new NotificationDispatcher(thread_safe_sender_.get()); 377 new NotificationDispatcher(thread_safe_sender_.get());
379 push_dispatcher_ = new PushDispatcher(thread_safe_sender_.get()); 378 push_dispatcher_ = new PushDispatcher(thread_safe_sender_.get());
380 navigator_connect_dispatcher_ =
381 new NavigatorConnectDispatcher(thread_safe_sender_.get());
382 379
383 channel_->AddFilter(histogram_message_filter_.get()); 380 channel_->AddFilter(histogram_message_filter_.get());
384 channel_->AddFilter(sync_message_filter_.get()); 381 channel_->AddFilter(sync_message_filter_.get());
385 channel_->AddFilter(resource_message_filter_.get()); 382 channel_->AddFilter(resource_message_filter_.get());
386 channel_->AddFilter(quota_message_filter_->GetFilter()); 383 channel_->AddFilter(quota_message_filter_->GetFilter());
387 channel_->AddFilter(notification_dispatcher_->GetFilter()); 384 channel_->AddFilter(notification_dispatcher_->GetFilter());
388 channel_->AddFilter(push_dispatcher_->GetFilter()); 385 channel_->AddFilter(push_dispatcher_->GetFilter());
389 channel_->AddFilter(service_worker_message_filter_->GetFilter()); 386 channel_->AddFilter(service_worker_message_filter_->GetFilter());
390 channel_->AddFilter(geofencing_message_filter_->GetFilter()); 387 channel_->AddFilter(geofencing_message_filter_->GetFilter());
391 channel_->AddFilter(bluetooth_message_filter_->GetFilter()); 388 channel_->AddFilter(bluetooth_message_filter_->GetFilter());
392 channel_->AddFilter(navigator_connect_dispatcher_->GetFilter());
393 389
394 if (!IsInBrowserProcess()) { 390 if (!IsInBrowserProcess()) {
395 // In single process mode, browser-side tracing will cover the whole 391 // In single process mode, browser-side tracing will cover the whole
396 // process including renderers. 392 // process including renderers.
397 channel_->AddFilter(new tracing::ChildTraceMessageFilter( 393 channel_->AddFilter(new tracing::ChildTraceMessageFilter(
398 ChildProcess::current()->io_task_runner())); 394 ChildProcess::current()->io_task_runner()));
399 } 395 }
400 396
401 // In single process mode we may already have a power monitor 397 // In single process mode we may already have a power monitor
402 if (!base::PowerMonitor::Get()) { 398 if (!base::PowerMonitor::Get()) {
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 699
704 void ChildThreadImpl::OnProcessBackgrounded(bool background) { 700 void ChildThreadImpl::OnProcessBackgrounded(bool background) {
705 // Set timer slack to maximum on main thread when in background. 701 // Set timer slack to maximum on main thread when in background.
706 base::TimerSlack timer_slack = base::TIMER_SLACK_NONE; 702 base::TimerSlack timer_slack = base::TIMER_SLACK_NONE;
707 if (background) 703 if (background)
708 timer_slack = base::TIMER_SLACK_MAXIMUM; 704 timer_slack = base::TIMER_SLACK_MAXIMUM;
709 base::MessageLoop::current()->SetTimerSlack(timer_slack); 705 base::MessageLoop::current()->SetTimerSlack(timer_slack);
710 } 706 }
711 707
712 } // namespace content 708 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698