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

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

Issue 2383853003: Move FrameMsg_NewFrame/NewFrameProxy to mojom (Closed)
Patch Set: Created 4 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
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 <utility> 7 #include <utility>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "content/browser/bad_message.h" 10 #include "content/browser/bad_message.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 parent_routing_id = parent_proxy->GetRoutingID(); 177 parent_routing_id = parent_proxy->GetRoutingID();
178 CHECK_NE(parent_routing_id, MSG_ROUTING_NONE); 178 CHECK_NE(parent_routing_id, MSG_ROUTING_NONE);
179 } 179 }
180 180
181 int opener_routing_id = MSG_ROUTING_NONE; 181 int opener_routing_id = MSG_ROUTING_NONE;
182 if (frame_tree_node_->opener()) { 182 if (frame_tree_node_->opener()) {
183 opener_routing_id = frame_tree_node_->render_manager()->GetOpenerRoutingID( 183 opener_routing_id = frame_tree_node_->render_manager()->GetOpenerRoutingID(
184 site_instance_.get()); 184 site_instance_.get());
185 } 185 }
186 186
187 Send(new FrameMsg_NewFrameProxy(routing_id_, 187 int view_routing_id = frame_tree_node_->frame_tree()
188 frame_tree_node_->frame_tree() 188 ->GetRenderViewHost(site_instance_.get())->GetRoutingID();
189 ->GetRenderViewHost(site_instance_.get()) 189 static_cast<RenderProcessHostImpl*>(GetProcess())->GetRendererInterface()
ncarter (slow) 2016/09/30 23:35:14 RPH->RPHI is not a safe cast; very similar to the
190 ->GetRoutingID(), 190 ->CreateFrameProxy(routing_id_, view_routing_id, opener_routing_id,
191 opener_routing_id, 191 parent_routing_id,
192 parent_routing_id, 192 frame_tree_node_->current_replication_state());
193 frame_tree_node_
194 ->current_replication_state()));
195 193
196 render_frame_proxy_created_ = true; 194 render_frame_proxy_created_ = true;
197 195
198 // For subframes, initialize the proxy's FrameOwnerProperties only if they 196 // For subframes, initialize the proxy's FrameOwnerProperties only if they
199 // differ from default values. 197 // differ from default values.
200 bool should_send_properties = 198 bool should_send_properties =
201 frame_tree_node_->frame_owner_properties() != FrameOwnerProperties(); 199 frame_tree_node_->frame_owner_properties() != FrameOwnerProperties();
202 if (frame_tree_node_->parent() && should_send_properties) { 200 if (frame_tree_node_->parent() && should_send_properties) {
203 Send(new FrameMsg_SetFrameOwnerProperties( 201 Send(new FrameMsg_SetFrameOwnerProperties(
204 routing_id_, frame_tree_node_->frame_owner_properties())); 202 routing_id_, frame_tree_node_->frame_owner_properties()));
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 target_rfh->Send(new FrameMsg_AdvanceFocus(target_rfh->GetRoutingID(), type, 367 target_rfh->Send(new FrameMsg_AdvanceFocus(target_rfh->GetRoutingID(), type,
370 source_proxy_routing_id)); 368 source_proxy_routing_id));
371 } 369 }
372 370
373 void RenderFrameProxyHost::OnFrameFocused() { 371 void RenderFrameProxyHost::OnFrameFocused() {
374 frame_tree_node_->current_frame_host()->delegate()->SetFocusedFrame( 372 frame_tree_node_->current_frame_host()->delegate()->SetFocusedFrame(
375 frame_tree_node_, GetSiteInstance()); 373 frame_tree_node_, GetSiteInstance());
376 } 374 }
377 375
378 } // namespace content 376 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698