Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(554)

Side by Side Diff: content/browser/frame_host/render_frame_proxy_host.cc

Issue 656293005: Fix control message handling for RenderFrameProxyHost::Send. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698