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

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

Issue 1234413006: Move the Web Bluetooth implementation from child/ to renderer/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Rebase Created 5 years, 5 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
« no previous file with comments | « content/child/child_thread_impl.h ('k') | content/content_child.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 13 matching lines...) Expand all
24 #include "base/single_thread_task_runner.h" 24 #include "base/single_thread_task_runner.h"
25 #include "base/strings/string_number_conversions.h" 25 #include "base/strings/string_number_conversions.h"
26 #include "base/strings/string_util.h" 26 #include "base/strings/string_util.h"
27 #include "base/synchronization/condition_variable.h" 27 #include "base/synchronization/condition_variable.h"
28 #include "base/synchronization/lock.h" 28 #include "base/synchronization/lock.h"
29 #include "base/thread_task_runner_handle.h" 29 #include "base/thread_task_runner_handle.h"
30 #include "base/threading/thread_local.h" 30 #include "base/threading/thread_local.h"
31 #include "base/trace_event/memory_dump_manager.h" 31 #include "base/trace_event/memory_dump_manager.h"
32 #include "base/tracked_objects.h" 32 #include "base/tracked_objects.h"
33 #include "components/tracing/child_trace_message_filter.h" 33 #include "components/tracing/child_trace_message_filter.h"
34 #include "content/child/bluetooth/bluetooth_message_filter.h"
35 #include "content/child/child_discardable_shared_memory_manager.h" 34 #include "content/child/child_discardable_shared_memory_manager.h"
36 #include "content/child/child_gpu_memory_buffer_manager.h" 35 #include "content/child/child_gpu_memory_buffer_manager.h"
37 #include "content/child/child_histogram_message_filter.h" 36 #include "content/child/child_histogram_message_filter.h"
38 #include "content/child/child_process.h" 37 #include "content/child/child_process.h"
39 #include "content/child/child_resource_message_filter.h" 38 #include "content/child/child_resource_message_filter.h"
40 #include "content/child/child_shared_bitmap_manager.h" 39 #include "content/child/child_shared_bitmap_manager.h"
41 #include "content/child/fileapi/file_system_dispatcher.h" 40 #include "content/child/fileapi/file_system_dispatcher.h"
42 #include "content/child/fileapi/webfilesystem_impl.h" 41 #include "content/child/fileapi/webfilesystem_impl.h"
43 #include "content/child/geofencing/geofencing_message_filter.h" 42 #include "content/child/geofencing/geofencing_message_filter.h"
44 #include "content/child/mojo/mojo_application.h" 43 #include "content/child/mojo/mojo_application.h"
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 393
395 service_worker_message_filter_ = 394 service_worker_message_filter_ =
396 new ServiceWorkerMessageFilter(thread_safe_sender_.get()); 395 new ServiceWorkerMessageFilter(thread_safe_sender_.get());
397 396
398 quota_message_filter_ = 397 quota_message_filter_ =
399 new QuotaMessageFilter(thread_safe_sender_.get()); 398 new QuotaMessageFilter(thread_safe_sender_.get());
400 quota_dispatcher_.reset(new QuotaDispatcher(thread_safe_sender_.get(), 399 quota_dispatcher_.reset(new QuotaDispatcher(thread_safe_sender_.get(),
401 quota_message_filter_.get())); 400 quota_message_filter_.get()));
402 geofencing_message_filter_ = 401 geofencing_message_filter_ =
403 new GeofencingMessageFilter(thread_safe_sender_.get()); 402 new GeofencingMessageFilter(thread_safe_sender_.get());
404 bluetooth_message_filter_ =
405 new BluetoothMessageFilter(thread_safe_sender_.get());
406 notification_dispatcher_ = 403 notification_dispatcher_ =
407 new NotificationDispatcher(thread_safe_sender_.get()); 404 new NotificationDispatcher(thread_safe_sender_.get());
408 push_dispatcher_ = new PushDispatcher(thread_safe_sender_.get()); 405 push_dispatcher_ = new PushDispatcher(thread_safe_sender_.get());
409 406
410 channel_->AddFilter(histogram_message_filter_.get()); 407 channel_->AddFilter(histogram_message_filter_.get());
411 channel_->AddFilter(sync_message_filter_.get()); 408 channel_->AddFilter(sync_message_filter_.get());
412 channel_->AddFilter(resource_message_filter_.get()); 409 channel_->AddFilter(resource_message_filter_.get());
413 channel_->AddFilter(quota_message_filter_->GetFilter()); 410 channel_->AddFilter(quota_message_filter_->GetFilter());
414 channel_->AddFilter(notification_dispatcher_->GetFilter()); 411 channel_->AddFilter(notification_dispatcher_->GetFilter());
415 channel_->AddFilter(push_dispatcher_->GetFilter()); 412 channel_->AddFilter(push_dispatcher_->GetFilter());
416 channel_->AddFilter(service_worker_message_filter_->GetFilter()); 413 channel_->AddFilter(service_worker_message_filter_->GetFilter());
417 channel_->AddFilter(geofencing_message_filter_->GetFilter()); 414 channel_->AddFilter(geofencing_message_filter_->GetFilter());
418 channel_->AddFilter(bluetooth_message_filter_->GetFilter());
419 415
420 if (!IsInBrowserProcess()) { 416 if (!IsInBrowserProcess()) {
421 // In single process mode, browser-side tracing will cover the whole 417 // In single process mode, browser-side tracing will cover the whole
422 // process including renderers. 418 // process including renderers.
423 channel_->AddFilter(new tracing::ChildTraceMessageFilter( 419 channel_->AddFilter(new tracing::ChildTraceMessageFilter(
424 ChildProcess::current()->io_task_runner())); 420 ChildProcess::current()->io_task_runner()));
425 } 421 }
426 422
427 // In single process mode we may already have a power monitor 423 // In single process mode we may already have a power monitor
428 if (!base::PowerMonitor::Get()) { 424 if (!base::PowerMonitor::Get()) {
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 724
729 void ChildThreadImpl::OnProcessBackgrounded(bool background) { 725 void ChildThreadImpl::OnProcessBackgrounded(bool background) {
730 // Set timer slack to maximum on main thread when in background. 726 // Set timer slack to maximum on main thread when in background.
731 base::TimerSlack timer_slack = base::TIMER_SLACK_NONE; 727 base::TimerSlack timer_slack = base::TIMER_SLACK_NONE;
732 if (background) 728 if (background)
733 timer_slack = base::TIMER_SLACK_MAXIMUM; 729 timer_slack = base::TIMER_SLACK_MAXIMUM;
734 base::MessageLoop::current()->SetTimerSlack(timer_slack); 730 base::MessageLoop::current()->SetTimerSlack(timer_slack);
735 } 731 }
736 732
737 } // namespace content 733 } // namespace content
OLDNEW
« no previous file with comments | « content/child/child_thread_impl.h ('k') | content/content_child.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698