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 crbug.com/423538 | |
nasko
2014/10/16 18:09:32
nit: Being paranoid, I'd prefix the URL with https
| |
106 if (msg->routing_id() != MSG_ROUTING_CONTROL) | |
107 msg->set_routing_id(routing_id_); | |
105 return GetProcess()->Send(msg); | 108 return GetProcess()->Send(msg); |
106 } | 109 } |
107 | 110 |
108 bool RenderFrameProxyHost::OnMessageReceived(const IPC::Message& msg) { | 111 bool RenderFrameProxyHost::OnMessageReceived(const IPC::Message& msg) { |
109 if (cross_process_frame_connector_.get() && | 112 if (cross_process_frame_connector_.get() && |
110 cross_process_frame_connector_->OnMessageReceived(msg)) | 113 cross_process_frame_connector_->OnMessageReceived(msg)) |
111 return true; | 114 return true; |
112 | 115 |
113 // TODO(nasko): This can be removed once we don't have a swapped out state on | 116 // TODO(nasko): This can be removed once we don't have a swapped out state on |
114 // RenderFrameHosts. See https://crbug.com/357747. | 117 // RenderFrameHosts. See https://crbug.com/357747. |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
153 void RenderFrameProxyHost::DisownOpener() { | 156 void RenderFrameProxyHost::DisownOpener() { |
154 Send(new FrameMsg_DisownOpener(GetRoutingID())); | 157 Send(new FrameMsg_DisownOpener(GetRoutingID())); |
155 } | 158 } |
156 | 159 |
157 void RenderFrameProxyHost::OnOpenURL( | 160 void RenderFrameProxyHost::OnOpenURL( |
158 const FrameHostMsg_OpenURL_Params& params) { | 161 const FrameHostMsg_OpenURL_Params& params) { |
159 frame_tree_node_->current_frame_host()->OpenURL(params); | 162 frame_tree_node_->current_frame_host()->OpenURL(params); |
160 } | 163 } |
161 | 164 |
162 } // namespace content | 165 } // namespace content |
OLD | NEW |