| 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 665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 676 } | 676 } |
| 677 | 677 |
| 678 void RenderThreadImpl::AddRoute(int32 routing_id, IPC::Listener* listener) { | 678 void RenderThreadImpl::AddRoute(int32 routing_id, IPC::Listener* listener) { |
| 679 ChildThread::GetRouter()->AddRoute(routing_id, listener); | 679 ChildThread::GetRouter()->AddRoute(routing_id, listener); |
| 680 } | 680 } |
| 681 | 681 |
| 682 void RenderThreadImpl::RemoveRoute(int32 routing_id) { | 682 void RenderThreadImpl::RemoveRoute(int32 routing_id) { |
| 683 ChildThread::GetRouter()->RemoveRoute(routing_id); | 683 ChildThread::GetRouter()->RemoveRoute(routing_id); |
| 684 } | 684 } |
| 685 | 685 |
| 686 void RenderThreadImpl::AddSharedWorkerRoute(int32 routing_id, |
| 687 IPC::Listener* listener) { |
| 688 AddRoute(routing_id, listener); |
| 689 if (devtools_agent_message_filter_.get()) { |
| 690 devtools_agent_message_filter_->AddSharedWorkerRouteOnMainThread( |
| 691 routing_id); |
| 692 } |
| 693 } |
| 694 |
| 695 void RenderThreadImpl::RemoveSharedWorkerRoute(int32 routing_id) { |
| 696 RemoveRoute(routing_id); |
| 697 if (devtools_agent_message_filter_.get()) { |
| 698 devtools_agent_message_filter_->RemoveSharedWorkerRouteOnMainThread( |
| 699 routing_id); |
| 700 } |
| 701 } |
| 702 |
| 686 int RenderThreadImpl::GenerateRoutingID() { | 703 int RenderThreadImpl::GenerateRoutingID() { |
| 687 int routing_id = MSG_ROUTING_NONE; | 704 int routing_id = MSG_ROUTING_NONE; |
| 688 Send(new ViewHostMsg_GenerateRoutingID(&routing_id)); | 705 Send(new ViewHostMsg_GenerateRoutingID(&routing_id)); |
| 689 return routing_id; | 706 return routing_id; |
| 690 } | 707 } |
| 691 | 708 |
| 692 void RenderThreadImpl::AddFilter(IPC::ChannelProxy::MessageFilter* filter) { | 709 void RenderThreadImpl::AddFilter(IPC::ChannelProxy::MessageFilter* filter) { |
| 693 channel()->AddFilter(filter); | 710 channel()->AddFilter(filter); |
| 694 } | 711 } |
| 695 | 712 |
| (...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1504 hidden_widget_count_--; | 1521 hidden_widget_count_--; |
| 1505 | 1522 |
| 1506 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { | 1523 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { |
| 1507 return; | 1524 return; |
| 1508 } | 1525 } |
| 1509 | 1526 |
| 1510 ScheduleIdleHandler(kLongIdleHandlerDelayMs); | 1527 ScheduleIdleHandler(kLongIdleHandlerDelayMs); |
| 1511 } | 1528 } |
| 1512 | 1529 |
| 1513 } // namespace content | 1530 } // namespace content |
| OLD | NEW |