OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/browser/frame_host/render_frame_host_impl.h" | 5 #include "content/browser/frame_host/render_frame_host_impl.h" |
6 | 6 |
7 #include "base/containers/hash_tables.h" | 7 #include "base/containers/hash_tables.h" |
8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
9 #include "content/browser/frame_host/frame_tree.h" | 9 #include "content/browser/frame_host/frame_tree.h" |
10 #include "content/browser/frame_host/render_frame_host_delegate.h" | 10 #include "content/browser/frame_host/render_frame_host_delegate.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 this)); | 49 this)); |
50 } | 50 } |
51 | 51 |
52 RenderFrameHostImpl::~RenderFrameHostImpl() { | 52 RenderFrameHostImpl::~RenderFrameHostImpl() { |
53 GetProcess()->RemoveRoute(routing_id_); | 53 GetProcess()->RemoveRoute(routing_id_); |
54 g_routing_id_frame_map.Get().erase( | 54 g_routing_id_frame_map.Get().erase( |
55 RenderFrameHostID(GetProcess()->GetID(), routing_id_)); | 55 RenderFrameHostID(GetProcess()->GetID(), routing_id_)); |
56 | 56 |
57 } | 57 } |
58 | 58 |
| 59 int RenderFrameHostImpl::GetRoutingID() { |
| 60 return routing_id_; |
| 61 } |
| 62 |
59 bool RenderFrameHostImpl::Send(IPC::Message* message) { | 63 bool RenderFrameHostImpl::Send(IPC::Message* message) { |
60 return GetProcess()->Send(message); | 64 return GetProcess()->Send(message); |
61 } | 65 } |
62 | 66 |
63 bool RenderFrameHostImpl::OnMessageReceived(const IPC::Message &msg) { | 67 bool RenderFrameHostImpl::OnMessageReceived(const IPC::Message &msg) { |
64 bool handled = true; | 68 bool handled = true; |
65 bool msg_is_ok = true; | 69 bool msg_is_ok = true; |
66 IPC_BEGIN_MESSAGE_MAP_EX(RenderFrameHostImpl, msg, msg_is_ok) | 70 IPC_BEGIN_MESSAGE_MAP_EX(RenderFrameHostImpl, msg, msg_is_ok) |
67 IPC_MESSAGE_HANDLER(FrameHostMsg_Detach, OnDetach) | 71 IPC_MESSAGE_HANDLER(FrameHostMsg_Detach, OnDetach) |
68 IPC_MESSAGE_HANDLER(FrameHostMsg_DidStartProvisionalLoadForFrame, | 72 IPC_MESSAGE_HANDLER(FrameHostMsg_DidStartProvisionalLoadForFrame, |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 frame_id, parent_frame_id, is_main_frame, url); | 108 frame_id, parent_frame_id, is_main_frame, url); |
105 } | 109 } |
106 | 110 |
107 void RenderFrameHostImpl::OnPepperPluginHung(int plugin_child_id, | 111 void RenderFrameHostImpl::OnPepperPluginHung(int plugin_child_id, |
108 const base::FilePath& path, | 112 const base::FilePath& path, |
109 bool is_hung) { | 113 bool is_hung) { |
110 delegate_->PepperPluginHung(plugin_child_id, path, is_hung); | 114 delegate_->PepperPluginHung(plugin_child_id, path, is_hung); |
111 } | 115 } |
112 | 116 |
113 } // namespace content | 117 } // namespace content |
OLD | NEW |