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/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/containers/hash_tables.h" | 9 #include "base/containers/hash_tables.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
593 RenderFrameHostImpl::AccessibilityGetNativeViewAccessible() { | 593 RenderFrameHostImpl::AccessibilityGetNativeViewAccessible() { |
594 RenderWidgetHostViewBase* view = static_cast<RenderWidgetHostViewBase*>( | 594 RenderWidgetHostViewBase* view = static_cast<RenderWidgetHostViewBase*>( |
595 render_view_host_->GetView()); | 595 render_view_host_->GetView()); |
596 if (view) | 596 if (view) |
597 return view->AccessibilityGetNativeViewAccessible(); | 597 return view->AccessibilityGetNativeViewAccessible(); |
598 return NULL; | 598 return NULL; |
599 } | 599 } |
600 | 600 |
601 bool RenderFrameHostImpl::CreateRenderFrame(int parent_routing_id, | 601 bool RenderFrameHostImpl::CreateRenderFrame(int parent_routing_id, |
602 int previous_sibling_routing_id, | 602 int previous_sibling_routing_id, |
603 int proxy_routing_id) { | 603 int proxy_routing_id, |
604 int opener_routing_id) { | |
Charlie Reis
2015/08/28 23:27:38
nit: The ordering here and below is a bit confusin
alexmos
2015/08/31 23:54:28
Done.
| |
604 TRACE_EVENT0("navigation", "RenderFrameHostImpl::CreateRenderFrame"); | 605 TRACE_EVENT0("navigation", "RenderFrameHostImpl::CreateRenderFrame"); |
605 DCHECK(!IsRenderFrameLive()) << "Creating frame twice"; | 606 DCHECK(!IsRenderFrameLive()) << "Creating frame twice"; |
606 | 607 |
607 // The process may (if we're sharing a process with another host that already | 608 // The process may (if we're sharing a process with another host that already |
608 // initialized it) or may not (we have our own process or the old process | 609 // initialized it) or may not (we have our own process or the old process |
609 // crashed) have been initialized. Calling Init multiple times will be | 610 // crashed) have been initialized. Calling Init multiple times will be |
610 // ignored, so this is safe. | 611 // ignored, so this is safe. |
611 if (!GetProcess()->Init()) | 612 if (!GetProcess()->Init()) |
612 return false; | 613 return false; |
613 | 614 |
614 DCHECK(GetProcess()->HasConnection()); | 615 DCHECK(GetProcess()->HasConnection()); |
615 | 616 |
616 FrameMsg_NewFrame_Params params; | 617 FrameMsg_NewFrame_Params params; |
617 params.routing_id = routing_id_; | 618 params.routing_id = routing_id_; |
618 params.parent_routing_id = parent_routing_id; | 619 params.parent_routing_id = parent_routing_id; |
619 params.proxy_routing_id = proxy_routing_id; | 620 params.proxy_routing_id = proxy_routing_id; |
620 params.previous_sibling_routing_id = previous_sibling_routing_id; | 621 params.previous_sibling_routing_id = previous_sibling_routing_id; |
622 params.opener_routing_id = opener_routing_id; | |
Charlie Reis
2015/08/28 23:27:38
Maybe it should go: routing_id, proxy, opener, par
alexmos
2015/08/31 23:54:28
Done. I changed it to follow your suggested order
Charlie Reis
2015/09/01 22:04:26
I suppose it could also go: routing_id, proxy, par
alexmos
2015/09/01 23:51:02
Good reasoning -- I agree both orders make sense.
| |
621 params.replication_state = frame_tree_node()->current_replication_state(); | 623 params.replication_state = frame_tree_node()->current_replication_state(); |
622 | 624 |
623 if (render_widget_host_) { | 625 if (render_widget_host_) { |
624 params.widget_params.routing_id = render_widget_host_->GetRoutingID(); | 626 params.widget_params.routing_id = render_widget_host_->GetRoutingID(); |
625 params.widget_params.surface_id = render_widget_host_->surface_id(); | 627 params.widget_params.surface_id = render_widget_host_->surface_id(); |
626 params.widget_params.hidden = render_widget_host_->is_hidden(); | 628 params.widget_params.hidden = render_widget_host_->is_hidden(); |
627 } else { | 629 } else { |
628 // MSG_ROUTING_NONE will prevent a new RenderWidget from being created in | 630 // MSG_ROUTING_NONE will prevent a new RenderWidget from being created in |
629 // the renderer process. | 631 // the renderer process. |
630 params.widget_params.routing_id = MSG_ROUTING_NONE; | 632 params.widget_params.routing_id = MSG_ROUTING_NONE; |
(...skipping 1579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2210 BrowserPluginInstanceIDToAXTreeID(value))); | 2212 BrowserPluginInstanceIDToAXTreeID(value))); |
2211 break; | 2213 break; |
2212 case AX_CONTENT_INT_ATTRIBUTE_LAST: | 2214 case AX_CONTENT_INT_ATTRIBUTE_LAST: |
2213 NOTREACHED(); | 2215 NOTREACHED(); |
2214 break; | 2216 break; |
2215 } | 2217 } |
2216 } | 2218 } |
2217 } | 2219 } |
2218 | 2220 |
2219 } // namespace content | 2221 } // namespace content |
OLD | NEW |