OLD | NEW |
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 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
604 if (mojo_application_->OnMessageReceived(msg)) | 604 if (mojo_application_->OnMessageReceived(msg)) |
605 return true; | 605 return true; |
606 | 606 |
607 // Resource responses are sent to the resource dispatcher. | 607 // Resource responses are sent to the resource dispatcher. |
608 if (resource_dispatcher_->OnMessageReceived(msg)) | 608 if (resource_dispatcher_->OnMessageReceived(msg)) |
609 return true; | 609 return true; |
610 if (websocket_dispatcher_->OnMessageReceived(msg)) | 610 if (websocket_dispatcher_->OnMessageReceived(msg)) |
611 return true; | 611 return true; |
612 if (file_system_dispatcher_->OnMessageReceived(msg)) | 612 if (file_system_dispatcher_->OnMessageReceived(msg)) |
613 return true; | 613 return true; |
| 614 if (attachment_broker_ && attachment_broker_->OnMessageReceived(msg)) |
| 615 return true; |
614 | 616 |
615 bool handled = true; | 617 bool handled = true; |
616 IPC_BEGIN_MESSAGE_MAP(ChildThreadImpl, msg) | 618 IPC_BEGIN_MESSAGE_MAP(ChildThreadImpl, msg) |
617 IPC_MESSAGE_HANDLER(ChildProcessMsg_Shutdown, OnShutdown) | 619 IPC_MESSAGE_HANDLER(ChildProcessMsg_Shutdown, OnShutdown) |
618 #if defined(IPC_MESSAGE_LOG_ENABLED) | 620 #if defined(IPC_MESSAGE_LOG_ENABLED) |
619 IPC_MESSAGE_HANDLER(ChildProcessMsg_SetIPCLoggingEnabled, | 621 IPC_MESSAGE_HANDLER(ChildProcessMsg_SetIPCLoggingEnabled, |
620 OnSetIPCLoggingEnabled) | 622 OnSetIPCLoggingEnabled) |
621 #endif | 623 #endif |
622 IPC_MESSAGE_HANDLER(ChildProcessMsg_SetProfilerStatus, | 624 IPC_MESSAGE_HANDLER(ChildProcessMsg_SetProfilerStatus, |
623 OnSetProfilerStatus) | 625 OnSetProfilerStatus) |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
726 | 728 |
727 void ChildThreadImpl::OnProcessBackgrounded(bool background) { | 729 void ChildThreadImpl::OnProcessBackgrounded(bool background) { |
728 // Set timer slack to maximum on main thread when in background. | 730 // Set timer slack to maximum on main thread when in background. |
729 base::TimerSlack timer_slack = base::TIMER_SLACK_NONE; | 731 base::TimerSlack timer_slack = base::TIMER_SLACK_NONE; |
730 if (background) | 732 if (background) |
731 timer_slack = base::TIMER_SLACK_MAXIMUM; | 733 timer_slack = base::TIMER_SLACK_MAXIMUM; |
732 base::MessageLoop::current()->SetTimerSlack(timer_slack); | 734 base::MessageLoop::current()->SetTimerSlack(timer_slack); |
733 } | 735 } |
734 | 736 |
735 } // namespace content | 737 } // namespace content |
OLD | NEW |