OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.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/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 1940 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1951 | 1951 |
1952 return GetRenderViewHost()->Send(message); | 1952 return GetRenderViewHost()->Send(message); |
1953 } | 1953 } |
1954 | 1954 |
1955 bool WebContentsImpl::NavigateToPendingEntry( | 1955 bool WebContentsImpl::NavigateToPendingEntry( |
1956 NavigationController::ReloadType reload_type) { | 1956 NavigationController::ReloadType reload_type) { |
1957 FrameTreeNode* node = frame_tree_.root(); | 1957 FrameTreeNode* node = frame_tree_.root(); |
1958 | 1958 |
1959 // Navigate in the FrameTreeNode specified in the pending entry, if any. This | 1959 // Navigate in the FrameTreeNode specified in the pending entry, if any. This |
1960 // is currently only used in --site-per-process and tests. | 1960 // is currently only used in --site-per-process and tests. |
| 1961 // TODO(creis): Remove this method and NavigationEntryImpl::frame_tree_node_id |
| 1962 // by using FrameNavigationEntries instead. See https://crbug.com/236848. |
1961 NavigationEntryImpl* pending_entry = | 1963 NavigationEntryImpl* pending_entry = |
1962 NavigationEntryImpl::FromNavigationEntry(controller_.GetPendingEntry()); | 1964 NavigationEntryImpl::FromNavigationEntry(controller_.GetPendingEntry()); |
1963 if (pending_entry->frame_tree_node_id() != -1) { | 1965 if (pending_entry->frame_tree_node_id() != -1) { |
1964 FrameTreeNode* subframe = | 1966 FrameTreeNode* subframe = |
1965 frame_tree_.FindByID(pending_entry->frame_tree_node_id()); | 1967 frame_tree_.FindByID(pending_entry->frame_tree_node_id()); |
1966 DCHECK(subframe); | 1968 DCHECK(subframe); |
1967 if (subframe) | 1969 if (subframe) |
1968 node = subframe; | 1970 node = subframe; |
1969 } | 1971 } |
1970 | 1972 |
1971 return node->navigator()->NavigateToPendingEntry( | 1973 return node->navigator()->NavigateToPendingEntry(node, reload_type); |
1972 node->current_frame_host(), reload_type); | |
1973 } | 1974 } |
1974 | 1975 |
1975 void WebContentsImpl::RenderFrameForInterstitialPageCreated( | 1976 void WebContentsImpl::RenderFrameForInterstitialPageCreated( |
1976 RenderFrameHost* render_frame_host) { | 1977 RenderFrameHost* render_frame_host) { |
1977 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 1978 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
1978 RenderFrameForInterstitialPageCreated(render_frame_host)); | 1979 RenderFrameForInterstitialPageCreated(render_frame_host)); |
1979 } | 1980 } |
1980 | 1981 |
1981 void WebContentsImpl::AttachInterstitialPage( | 1982 void WebContentsImpl::AttachInterstitialPage( |
1982 InterstitialPageImpl* interstitial_page) { | 1983 InterstitialPageImpl* interstitial_page) { |
(...skipping 2530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4513 node->render_manager()->ResumeResponseDeferredAtStart(); | 4514 node->render_manager()->ResumeResponseDeferredAtStart(); |
4514 } | 4515 } |
4515 | 4516 |
4516 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { | 4517 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { |
4517 force_disable_overscroll_content_ = force_disable; | 4518 force_disable_overscroll_content_ = force_disable; |
4518 if (view_) | 4519 if (view_) |
4519 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); | 4520 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); |
4520 } | 4521 } |
4521 | 4522 |
4522 } // namespace content | 4523 } // namespace content |
OLD | NEW |