| 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 1597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1608 // Some messages are handled by delegates. | 1608 // Some messages are handled by delegates. |
| 1609 if (appcache_dispatcher_->OnMessageReceived(msg) || | 1609 if (appcache_dispatcher_->OnMessageReceived(msg) || |
| 1610 dom_storage_dispatcher_->OnMessageReceived(msg) || | 1610 dom_storage_dispatcher_->OnMessageReceived(msg) || |
| 1611 embedded_worker_dispatcher_->OnMessageReceived(msg)) { | 1611 embedded_worker_dispatcher_->OnMessageReceived(msg)) { |
| 1612 return true; | 1612 return true; |
| 1613 } | 1613 } |
| 1614 | 1614 |
| 1615 bool handled = true; | 1615 bool handled = true; |
| 1616 IPC_BEGIN_MESSAGE_MAP(RenderThreadImpl, msg) | 1616 IPC_BEGIN_MESSAGE_MAP(RenderThreadImpl, msg) |
| 1617 IPC_MESSAGE_HANDLER(FrameMsg_NewFrame, OnCreateNewFrame) | 1617 IPC_MESSAGE_HANDLER(FrameMsg_NewFrame, OnCreateNewFrame) |
| 1618 IPC_MESSAGE_HANDLER(FrameMsg_Detach, OnDetachFrame) |
| 1618 IPC_MESSAGE_HANDLER(FrameMsg_NewFrameProxy, OnCreateNewFrameProxy) | 1619 IPC_MESSAGE_HANDLER(FrameMsg_NewFrameProxy, OnCreateNewFrameProxy) |
| 1619 IPC_MESSAGE_HANDLER(ViewMsg_SetZoomLevelForCurrentURL, | 1620 IPC_MESSAGE_HANDLER(ViewMsg_SetZoomLevelForCurrentURL, |
| 1620 OnSetZoomLevelForCurrentURL) | 1621 OnSetZoomLevelForCurrentURL) |
| 1621 // TODO(port): removed from render_messages_internal.h; | 1622 // TODO(port): removed from render_messages_internal.h; |
| 1622 // is there a new non-windows message I should add here? | 1623 // is there a new non-windows message I should add here? |
| 1623 IPC_MESSAGE_HANDLER(ViewMsg_New, OnCreateNewView) | 1624 IPC_MESSAGE_HANDLER(ViewMsg_New, OnCreateNewView) |
| 1624 IPC_MESSAGE_HANDLER(ViewMsg_NetworkConnectionChanged, | 1625 IPC_MESSAGE_HANDLER(ViewMsg_NetworkConnectionChanged, |
| 1625 OnNetworkConnectionChanged) | 1626 OnNetworkConnectionChanged) |
| 1626 IPC_MESSAGE_HANDLER(WorkerProcessMsg_CreateWorker, OnCreateNewSharedWorker) | 1627 IPC_MESSAGE_HANDLER(WorkerProcessMsg_CreateWorker, OnCreateNewSharedWorker) |
| 1627 IPC_MESSAGE_HANDLER(ViewMsg_TimezoneChange, OnUpdateTimezone) | 1628 IPC_MESSAGE_HANDLER(ViewMsg_TimezoneChange, OnUpdateTimezone) |
| (...skipping 24 matching lines...) Expand all Loading... |
| 1652 | 1653 |
| 1653 void RenderThreadImpl::OnCreateNewFrame(FrameMsg_NewFrame_Params params) { | 1654 void RenderThreadImpl::OnCreateNewFrame(FrameMsg_NewFrame_Params params) { |
| 1654 CompositorDependencies* compositor_deps = this; | 1655 CompositorDependencies* compositor_deps = this; |
| 1655 RenderFrameImpl::CreateFrame( | 1656 RenderFrameImpl::CreateFrame( |
| 1656 params.routing_id, params.proxy_routing_id, params.opener_routing_id, | 1657 params.routing_id, params.proxy_routing_id, params.opener_routing_id, |
| 1657 params.parent_routing_id, params.previous_sibling_routing_id, | 1658 params.parent_routing_id, params.previous_sibling_routing_id, |
| 1658 params.replication_state, compositor_deps, params.widget_params, | 1659 params.replication_state, compositor_deps, params.widget_params, |
| 1659 params.frame_owner_properties); | 1660 params.frame_owner_properties); |
| 1660 } | 1661 } |
| 1661 | 1662 |
| 1663 void RenderThreadImpl::OnDetachFrame(int routing_id) { |
| 1664 RenderFrameImpl::DetachFrame(routing_id); |
| 1665 } |
| 1666 |
| 1662 void RenderThreadImpl::OnCreateNewFrameProxy( | 1667 void RenderThreadImpl::OnCreateNewFrameProxy( |
| 1663 int routing_id, | 1668 int routing_id, |
| 1664 int render_view_routing_id, | 1669 int render_view_routing_id, |
| 1665 int opener_routing_id, | 1670 int opener_routing_id, |
| 1666 int parent_routing_id, | 1671 int parent_routing_id, |
| 1667 const FrameReplicationState& replicated_state) { | 1672 const FrameReplicationState& replicated_state) { |
| 1668 RenderFrameProxy::CreateFrameProxy(routing_id, render_view_routing_id, | 1673 RenderFrameProxy::CreateFrameProxy(routing_id, render_view_routing_id, |
| 1669 opener_routing_id, parent_routing_id, | 1674 opener_routing_id, parent_routing_id, |
| 1670 replicated_state); | 1675 replicated_state); |
| 1671 } | 1676 } |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1992 | 1997 |
| 1993 void RenderThreadImpl::ReleaseFreeMemory() { | 1998 void RenderThreadImpl::ReleaseFreeMemory() { |
| 1994 base::allocator::ReleaseFreeMemory(); | 1999 base::allocator::ReleaseFreeMemory(); |
| 1995 discardable_shared_memory_manager()->ReleaseFreeMemory(); | 2000 discardable_shared_memory_manager()->ReleaseFreeMemory(); |
| 1996 | 2001 |
| 1997 if (blink_platform_impl_) | 2002 if (blink_platform_impl_) |
| 1998 blink::decommitFreeableMemory(); | 2003 blink::decommitFreeableMemory(); |
| 1999 } | 2004 } |
| 2000 | 2005 |
| 2001 } // namespace content | 2006 } // namespace content |
| OLD | NEW |