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 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
570 if (mojo_application_->OnMessageReceived(msg)) | 570 if (mojo_application_->OnMessageReceived(msg)) |
571 return true; | 571 return true; |
572 | 572 |
573 // Resource responses are sent to the resource dispatcher. | 573 // Resource responses are sent to the resource dispatcher. |
574 if (resource_dispatcher_->OnMessageReceived(msg)) | 574 if (resource_dispatcher_->OnMessageReceived(msg)) |
575 return true; | 575 return true; |
576 if (websocket_dispatcher_->OnMessageReceived(msg)) | 576 if (websocket_dispatcher_->OnMessageReceived(msg)) |
577 return true; | 577 return true; |
578 if (file_system_dispatcher_->OnMessageReceived(msg)) | 578 if (file_system_dispatcher_->OnMessageReceived(msg)) |
579 return true; | 579 return true; |
| 580 if (attachment_broker_ && attachment_broker_->OnMessageReceived(msg)) |
| 581 return true; |
580 | 582 |
581 bool handled = true; | 583 bool handled = true; |
582 IPC_BEGIN_MESSAGE_MAP(ChildThreadImpl, msg) | 584 IPC_BEGIN_MESSAGE_MAP(ChildThreadImpl, msg) |
583 IPC_MESSAGE_HANDLER(ChildProcessMsg_Shutdown, OnShutdown) | 585 IPC_MESSAGE_HANDLER(ChildProcessMsg_Shutdown, OnShutdown) |
584 #if defined(IPC_MESSAGE_LOG_ENABLED) | 586 #if defined(IPC_MESSAGE_LOG_ENABLED) |
585 IPC_MESSAGE_HANDLER(ChildProcessMsg_SetIPCLoggingEnabled, | 587 IPC_MESSAGE_HANDLER(ChildProcessMsg_SetIPCLoggingEnabled, |
586 OnSetIPCLoggingEnabled) | 588 OnSetIPCLoggingEnabled) |
587 #endif | 589 #endif |
588 IPC_MESSAGE_HANDLER(ChildProcessMsg_SetProfilerStatus, | 590 IPC_MESSAGE_HANDLER(ChildProcessMsg_SetProfilerStatus, |
589 OnSetProfilerStatus) | 591 OnSetProfilerStatus) |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
703 | 705 |
704 void ChildThreadImpl::OnProcessBackgrounded(bool background) { | 706 void ChildThreadImpl::OnProcessBackgrounded(bool background) { |
705 // Set timer slack to maximum on main thread when in background. | 707 // Set timer slack to maximum on main thread when in background. |
706 base::TimerSlack timer_slack = base::TIMER_SLACK_NONE; | 708 base::TimerSlack timer_slack = base::TIMER_SLACK_NONE; |
707 if (background) | 709 if (background) |
708 timer_slack = base::TIMER_SLACK_MAXIMUM; | 710 timer_slack = base::TIMER_SLACK_MAXIMUM; |
709 base::MessageLoop::current()->SetTimerSlack(timer_slack); | 711 base::MessageLoop::current()->SetTimerSlack(timer_slack); |
710 } | 712 } |
711 | 713 |
712 } // namespace content | 714 } // namespace content |
OLD | NEW |