| 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_manager.h" | 5 #include "content/browser/frame_host/render_frame_host_manager.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 570 switches::kEnableBrowserSideNavigation)); | 570 switches::kEnableBrowserSideNavigation)); |
| 571 // TODO(clamy): Check if navigations are blocked and if so, return | 571 // TODO(clamy): Check if navigations are blocked and if so, return |
| 572 // immediately. | 572 // immediately. |
| 573 NavigationRequestInfo info(params); | 573 NavigationRequestInfo info(params); |
| 574 | 574 |
| 575 info.first_party_for_cookies = frame_tree_node_->IsMainFrame() ? | 575 info.first_party_for_cookies = frame_tree_node_->IsMainFrame() ? |
| 576 params.url : frame_tree_node_->frame_tree()->root()->current_url(); | 576 params.url : frame_tree_node_->frame_tree()->root()->current_url(); |
| 577 info.is_main_frame = frame_tree_node_->IsMainFrame(); | 577 info.is_main_frame = frame_tree_node_->IsMainFrame(); |
| 578 info.parent_is_main_frame = !frame_tree_node_->parent() ? | 578 info.parent_is_main_frame = !frame_tree_node_->parent() ? |
| 579 false : frame_tree_node_->parent()->IsMainFrame(); | 579 false : frame_tree_node_->parent()->IsMainFrame(); |
| 580 info.is_showing = GetRenderWidgetHostView()->IsShowing(); | |
| 581 | 580 |
| 582 // TODO(clamy): Check if the current RFH should be initialized (in case it has | 581 // TODO(clamy): Check if the current RFH should be initialized (in case it has |
| 583 // crashed) not to display a sad tab while navigating. | 582 // crashed) not to display a sad tab while navigating. |
| 584 // TODO(clamy): Spawn a speculative renderer process if we do not have one to | 583 // TODO(clamy): Spawn a speculative renderer process if we do not have one to |
| 585 // use for the navigation. | 584 // use for the navigation. |
| 586 navigation_request_.reset(new NavigationRequest( | 585 navigation_request_.reset(new NavigationRequest( |
| 587 info, frame_tree_node_->frame_tree_node_id())); | 586 info, frame_tree_node_->frame_tree_node_id())); |
| 588 navigation_request_->BeginNavigation(params.request_body); | 587 navigation_request_->BeginNavigation(params.request_body); |
| 589 } | 588 } |
| 590 | 589 |
| (...skipping 1081 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1672 void RenderFrameHostManager::DeleteRenderFrameProxyHost( | 1671 void RenderFrameHostManager::DeleteRenderFrameProxyHost( |
| 1673 SiteInstance* instance) { | 1672 SiteInstance* instance) { |
| 1674 RenderFrameProxyHostMap::iterator iter = proxy_hosts_.find(instance->GetId()); | 1673 RenderFrameProxyHostMap::iterator iter = proxy_hosts_.find(instance->GetId()); |
| 1675 if (iter != proxy_hosts_.end()) { | 1674 if (iter != proxy_hosts_.end()) { |
| 1676 delete iter->second; | 1675 delete iter->second; |
| 1677 proxy_hosts_.erase(iter); | 1676 proxy_hosts_.erase(iter); |
| 1678 } | 1677 } |
| 1679 } | 1678 } |
| 1680 | 1679 |
| 1681 } // namespace content | 1680 } // namespace content |
| OLD | NEW |