Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 949473002: Avoid unnecessary casts in NavigationControllerImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1942 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 1961 // TODO(creis): Remove this method and NavigationEntryImpl::frame_tree_node_id
1962 // by using FrameNavigationEntries instead. See https://crbug.com/236848. 1962 // by using FrameNavigationEntries instead. See https://crbug.com/236848.
1963 NavigationEntryImpl* pending_entry = 1963 NavigationEntryImpl* pending_entry = controller_.GetPendingEntry();
1964 NavigationEntryImpl::FromNavigationEntry(controller_.GetPendingEntry());
1965 if (pending_entry->frame_tree_node_id() != -1) { 1964 if (pending_entry->frame_tree_node_id() != -1) {
1966 FrameTreeNode* subframe = 1965 FrameTreeNode* subframe =
1967 frame_tree_.FindByID(pending_entry->frame_tree_node_id()); 1966 frame_tree_.FindByID(pending_entry->frame_tree_node_id());
1968 DCHECK(subframe); 1967 DCHECK(subframe);
1969 if (subframe) 1968 if (subframe)
1970 node = subframe; 1969 node = subframe;
1971 } 1970 }
1972 1971
1973 return node->navigator()->NavigateToPendingEntry(node, reload_type); 1972 return node->navigator()->NavigateToPendingEntry(node, reload_type);
1974 } 1973 }
(...skipping 2539 matching lines...) Expand 10 before | Expand all | Expand 10 after
4514 node->render_manager()->ResumeResponseDeferredAtStart(); 4513 node->render_manager()->ResumeResponseDeferredAtStart();
4515 } 4514 }
4516 4515
4517 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { 4516 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) {
4518 force_disable_overscroll_content_ = force_disable; 4517 force_disable_overscroll_content_ = force_disable;
4519 if (view_) 4518 if (view_)
4520 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); 4519 view_->SetOverscrollControllerEnabled(CanOverscrollContent());
4521 } 4520 }
4522 4521
4523 } // namespace content 4522 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698