| 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/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 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 654 } | 654 } |
| 655 | 655 |
| 656 void RenderThreadImpl::AddRoute(int32 routing_id, IPC::Listener* listener) { | 656 void RenderThreadImpl::AddRoute(int32 routing_id, IPC::Listener* listener) { |
| 657 ChildThread::AddRoute(routing_id, listener); | 657 ChildThread::AddRoute(routing_id, listener); |
| 658 } | 658 } |
| 659 | 659 |
| 660 void RenderThreadImpl::RemoveRoute(int32 routing_id) { | 660 void RenderThreadImpl::RemoveRoute(int32 routing_id) { |
| 661 ChildThread::RemoveRoute(routing_id); | 661 ChildThread::RemoveRoute(routing_id); |
| 662 } | 662 } |
| 663 | 663 |
| 664 void RenderThreadImpl::AddSharedWorkerRoute(int32 routing_id, |
| 665 IPC::Listener* listener) { |
| 666 AddRoute(routing_id, listener); |
| 667 if (devtools_agent_message_filter_.get()) { |
| 668 devtools_agent_message_filter_->AddSharedWorkerRouteOnUI(routing_id); |
| 669 } |
| 670 } |
| 671 |
| 672 void RenderThreadImpl::RemoveSharedWorkerRoute(int32 routing_id) { |
| 673 RemoveRoute(routing_id); |
| 674 if (devtools_agent_message_filter_.get()) { |
| 675 devtools_agent_message_filter_->RemoveSharedWorkerRouteOnUI(routing_id); |
| 676 } |
| 677 } |
| 678 |
| 664 int RenderThreadImpl::GenerateRoutingID() { | 679 int RenderThreadImpl::GenerateRoutingID() { |
| 665 int routing_id = MSG_ROUTING_NONE; | 680 int routing_id = MSG_ROUTING_NONE; |
| 666 Send(new ViewHostMsg_GenerateRoutingID(&routing_id)); | 681 Send(new ViewHostMsg_GenerateRoutingID(&routing_id)); |
| 667 return routing_id; | 682 return routing_id; |
| 668 } | 683 } |
| 669 | 684 |
| 670 void RenderThreadImpl::AddFilter(IPC::ChannelProxy::MessageFilter* filter) { | 685 void RenderThreadImpl::AddFilter(IPC::ChannelProxy::MessageFilter* filter) { |
| 671 channel()->AddFilter(filter); | 686 channel()->AddFilter(filter); |
| 672 } | 687 } |
| 673 | 688 |
| (...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1468 hidden_widget_count_--; | 1483 hidden_widget_count_--; |
| 1469 | 1484 |
| 1470 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { | 1485 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { |
| 1471 return; | 1486 return; |
| 1472 } | 1487 } |
| 1473 | 1488 |
| 1474 ScheduleIdleHandler(kLongIdleHandlerDelayMs); | 1489 ScheduleIdleHandler(kLongIdleHandlerDelayMs); |
| 1475 } | 1490 } |
| 1476 | 1491 |
| 1477 } // namespace content | 1492 } // namespace content |
| OLD | NEW |