OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_proxy_host.h" | 5 #include "content/browser/frame_host/render_frame_proxy_host.h" |
6 | 6 |
7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
8 #include "content/browser/frame_host/cross_process_frame_connector.h" | 8 #include "content/browser/frame_host/cross_process_frame_connector.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/frame_tree_node.h" | 10 #include "content/browser/frame_host/frame_tree_node.h" |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 | 94 |
95 scoped_ptr<RenderFrameHostImpl> RenderFrameProxyHost::PassFrameHostOwnership() { | 95 scoped_ptr<RenderFrameHostImpl> RenderFrameProxyHost::PassFrameHostOwnership() { |
96 render_frame_host_->set_render_frame_proxy_host(NULL); | 96 render_frame_host_->set_render_frame_proxy_host(NULL); |
97 return render_frame_host_.Pass(); | 97 return render_frame_host_.Pass(); |
98 } | 98 } |
99 | 99 |
100 bool RenderFrameProxyHost::Send(IPC::Message *msg) { | 100 bool RenderFrameProxyHost::Send(IPC::Message *msg) { |
101 // TODO(nasko): For now, RenderFrameHost uses this object to send IPC messages | 101 // TODO(nasko): For now, RenderFrameHost uses this object to send IPC messages |
102 // while swapped out. This can be removed once we don't have a swapped out | 102 // while swapped out. This can be removed once we don't have a swapped out |
103 // state on RenderFrameHosts. See https://crbug.com/357747. | 103 // state on RenderFrameHosts. See https://crbug.com/357747. |
104 msg->set_routing_id(routing_id_); | 104 |
| 105 // Don't reset the routing ID for control messages. See |
| 106 // https://crbug.com/423538 |
| 107 if (msg->routing_id() != MSG_ROUTING_CONTROL) |
| 108 msg->set_routing_id(routing_id_); |
105 return GetProcess()->Send(msg); | 109 return GetProcess()->Send(msg); |
106 } | 110 } |
107 | 111 |
108 bool RenderFrameProxyHost::OnMessageReceived(const IPC::Message& msg) { | 112 bool RenderFrameProxyHost::OnMessageReceived(const IPC::Message& msg) { |
109 if (cross_process_frame_connector_.get() && | 113 if (cross_process_frame_connector_.get() && |
110 cross_process_frame_connector_->OnMessageReceived(msg)) | 114 cross_process_frame_connector_->OnMessageReceived(msg)) |
111 return true; | 115 return true; |
112 | 116 |
113 // TODO(nasko): This can be removed once we don't have a swapped out state on | 117 // TODO(nasko): This can be removed once we don't have a swapped out state on |
114 // RenderFrameHosts. See https://crbug.com/357747. | 118 // RenderFrameHosts. See https://crbug.com/357747. |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 void RenderFrameProxyHost::DisownOpener() { | 157 void RenderFrameProxyHost::DisownOpener() { |
154 Send(new FrameMsg_DisownOpener(GetRoutingID())); | 158 Send(new FrameMsg_DisownOpener(GetRoutingID())); |
155 } | 159 } |
156 | 160 |
157 void RenderFrameProxyHost::OnOpenURL( | 161 void RenderFrameProxyHost::OnOpenURL( |
158 const FrameHostMsg_OpenURL_Params& params) { | 162 const FrameHostMsg_OpenURL_Params& params) { |
159 frame_tree_node_->current_frame_host()->OpenURL(params); | 163 frame_tree_node_->current_frame_host()->OpenURL(params); |
160 } | 164 } |
161 | 165 |
162 } // namespace content | 166 } // namespace content |
OLD | NEW |