| 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 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 595 | 595 |
| 596 gfx::NativeViewAccessible | 596 gfx::NativeViewAccessible |
| 597 RenderFrameHostImpl::AccessibilityGetNativeViewAccessible() { | 597 RenderFrameHostImpl::AccessibilityGetNativeViewAccessible() { |
| 598 RenderWidgetHostViewBase* view = static_cast<RenderWidgetHostViewBase*>( | 598 RenderWidgetHostViewBase* view = static_cast<RenderWidgetHostViewBase*>( |
| 599 render_view_host_->GetView()); | 599 render_view_host_->GetView()); |
| 600 if (view) | 600 if (view) |
| 601 return view->AccessibilityGetNativeViewAccessible(); | 601 return view->AccessibilityGetNativeViewAccessible(); |
| 602 return NULL; | 602 return NULL; |
| 603 } | 603 } |
| 604 | 604 |
| 605 bool RenderFrameHostImpl::CreateRenderFrame(int parent_routing_id, | 605 bool RenderFrameHostImpl::CreateRenderFrame(int proxy_routing_id, |
| 606 int previous_sibling_routing_id, | 606 int opener_routing_id, |
| 607 int proxy_routing_id) { | 607 int parent_routing_id, |
| 608 int previous_sibling_routing_id) { |
| 608 TRACE_EVENT0("navigation", "RenderFrameHostImpl::CreateRenderFrame"); | 609 TRACE_EVENT0("navigation", "RenderFrameHostImpl::CreateRenderFrame"); |
| 609 DCHECK(!IsRenderFrameLive()) << "Creating frame twice"; | 610 DCHECK(!IsRenderFrameLive()) << "Creating frame twice"; |
| 610 | 611 |
| 611 // The process may (if we're sharing a process with another host that already | 612 // The process may (if we're sharing a process with another host that already |
| 612 // initialized it) or may not (we have our own process or the old process | 613 // initialized it) or may not (we have our own process or the old process |
| 613 // crashed) have been initialized. Calling Init multiple times will be | 614 // crashed) have been initialized. Calling Init multiple times will be |
| 614 // ignored, so this is safe. | 615 // ignored, so this is safe. |
| 615 if (!GetProcess()->Init()) | 616 if (!GetProcess()->Init()) |
| 616 return false; | 617 return false; |
| 617 | 618 |
| 618 DCHECK(GetProcess()->HasConnection()); | 619 DCHECK(GetProcess()->HasConnection()); |
| 619 | 620 |
| 620 FrameMsg_NewFrame_Params params; | 621 FrameMsg_NewFrame_Params params; |
| 621 params.routing_id = routing_id_; | 622 params.routing_id = routing_id_; |
| 623 params.proxy_routing_id = proxy_routing_id; |
| 624 params.opener_routing_id = opener_routing_id; |
| 622 params.parent_routing_id = parent_routing_id; | 625 params.parent_routing_id = parent_routing_id; |
| 623 params.proxy_routing_id = proxy_routing_id; | |
| 624 params.previous_sibling_routing_id = previous_sibling_routing_id; | 626 params.previous_sibling_routing_id = previous_sibling_routing_id; |
| 625 params.replication_state = frame_tree_node()->current_replication_state(); | 627 params.replication_state = frame_tree_node()->current_replication_state(); |
| 626 | 628 |
| 627 if (render_widget_host_) { | 629 if (render_widget_host_) { |
| 628 params.widget_params.routing_id = render_widget_host_->GetRoutingID(); | 630 params.widget_params.routing_id = render_widget_host_->GetRoutingID(); |
| 629 params.widget_params.surface_id = render_widget_host_->surface_id(); | 631 params.widget_params.surface_id = render_widget_host_->surface_id(); |
| 630 params.widget_params.hidden = render_widget_host_->is_hidden(); | 632 params.widget_params.hidden = render_widget_host_->is_hidden(); |
| 631 } else { | 633 } else { |
| 632 // MSG_ROUTING_NONE will prevent a new RenderWidget from being created in | 634 // MSG_ROUTING_NONE will prevent a new RenderWidget from being created in |
| 633 // the renderer process. | 635 // the renderer process. |
| (...skipping 1589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2223 BrowserPluginInstanceIDToAXTreeID(value))); | 2225 BrowserPluginInstanceIDToAXTreeID(value))); |
| 2224 break; | 2226 break; |
| 2225 case AX_CONTENT_INT_ATTRIBUTE_LAST: | 2227 case AX_CONTENT_INT_ATTRIBUTE_LAST: |
| 2226 NOTREACHED(); | 2228 NOTREACHED(); |
| 2227 break; | 2229 break; |
| 2228 } | 2230 } |
| 2229 } | 2231 } |
| 2230 } | 2232 } |
| 2231 | 2233 |
| 2232 } // namespace content | 2234 } // namespace content |
| OLD | NEW |