| 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 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 544 } | 544 } |
| 545 | 545 |
| 546 BrowserAccessibilityManager* manager = | 546 BrowserAccessibilityManager* manager = |
| 547 parent_frame->browser_accessibility_manager(); | 547 parent_frame->browser_accessibility_manager(); |
| 548 if (!manager) | 548 if (!manager) |
| 549 return NULL; | 549 return NULL; |
| 550 | 550 |
| 551 return manager->GetFromID(parent_node_id); | 551 return manager->GetFromID(parent_node_id); |
| 552 } | 552 } |
| 553 | 553 |
| 554 bool RenderFrameHostImpl::CreateRenderFrame(int parent_routing_id) { | 554 bool RenderFrameHostImpl::CreateRenderFrame(int parent_routing_id, |
| 555 int proxy_routing_id) { |
| 555 TRACE_EVENT0("navigation", "RenderFrameHostImpl::CreateRenderFrame"); | 556 TRACE_EVENT0("navigation", "RenderFrameHostImpl::CreateRenderFrame"); |
| 556 DCHECK(!IsRenderFrameLive()) << "Creating frame twice"; | 557 DCHECK(!IsRenderFrameLive()) << "Creating frame twice"; |
| 557 | 558 |
| 558 // The process may (if we're sharing a process with another host that already | 559 // The process may (if we're sharing a process with another host that already |
| 559 // initialized it) or may not (we have our own process or the old process | 560 // initialized it) or may not (we have our own process or the old process |
| 560 // crashed) have been initialized. Calling Init multiple times will be | 561 // crashed) have been initialized. Calling Init multiple times will be |
| 561 // ignored, so this is safe. | 562 // ignored, so this is safe. |
| 562 if (!GetProcess()->Init()) | 563 if (!GetProcess()->Init()) |
| 563 return false; | 564 return false; |
| 564 | 565 |
| 565 DCHECK(GetProcess()->HasConnection()); | 566 DCHECK(GetProcess()->HasConnection()); |
| 566 | 567 |
| 567 Send(new FrameMsg_NewFrame(routing_id_, parent_routing_id)); | 568 Send(new FrameMsg_NewFrame(routing_id_, parent_routing_id, proxy_routing_id)); |
| 568 | 569 |
| 569 // The renderer now has a RenderFrame for this RenderFrameHost. Note that | 570 // The renderer now has a RenderFrame for this RenderFrameHost. Note that |
| 570 // this path is only used for out-of-process iframes. Main frame RenderFrames | 571 // this path is only used for out-of-process iframes. Main frame RenderFrames |
| 571 // are created with their RenderView, and same-site iframes are created at the | 572 // are created with their RenderView, and same-site iframes are created at the |
| 572 // time of OnCreateChildFrame. | 573 // time of OnCreateChildFrame. |
| 573 set_render_frame_created(true); | 574 set_render_frame_created(true); |
| 574 | 575 |
| 575 return true; | 576 return true; |
| 576 } | 577 } |
| 577 | 578 |
| (...skipping 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1630 // Clear any state if a pending navigation is canceled or preempted. | 1631 // Clear any state if a pending navigation is canceled or preempted. |
| 1631 if (suspended_nav_params_) | 1632 if (suspended_nav_params_) |
| 1632 suspended_nav_params_.reset(); | 1633 suspended_nav_params_.reset(); |
| 1633 | 1634 |
| 1634 TRACE_EVENT_ASYNC_END0("navigation", | 1635 TRACE_EVENT_ASYNC_END0("navigation", |
| 1635 "RenderFrameHostImpl navigation suspended", this); | 1636 "RenderFrameHostImpl navigation suspended", this); |
| 1636 navigations_suspended_ = false; | 1637 navigations_suspended_ = false; |
| 1637 } | 1638 } |
| 1638 | 1639 |
| 1639 } // namespace content | 1640 } // namespace content |
| OLD | NEW |