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

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

Issue 1269813002: Add a NavigationThrottle to the public content/ interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@navigation-api
Patch Set: Addressed comments Created 5 years, 3 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 2760 matching lines...) Expand 10 before | Expand all | Expand 10 after
2771 return true; 2771 return true;
2772 return delegate_ && delegate_->ShouldFocusLocationBarByDefault(this); 2772 return delegate_ && delegate_->ShouldFocusLocationBarByDefault(this);
2773 } 2773 }
2774 2774
2775 void WebContentsImpl::SetFocusToLocationBar(bool select_all) { 2775 void WebContentsImpl::SetFocusToLocationBar(bool select_all) {
2776 if (delegate_) 2776 if (delegate_)
2777 delegate_->SetFocusToLocationBar(select_all); 2777 delegate_->SetFocusToLocationBar(select_all);
2778 } 2778 }
2779 2779
2780 void WebContentsImpl::DidStartNavigation(NavigationHandle* navigation_handle) { 2780 void WebContentsImpl::DidStartNavigation(NavigationHandle* navigation_handle) {
2781 static_cast<NavigationHandleImpl*>(navigation_handle)->set_web_contents(this);
nasko 2015/09/14 22:00:04 Is this the only usage of set_web_contents? Can we
clamy 2015/09/14 22:12:10 Well if I have a handy way to get to the WebConten
Charlie Reis 2015/09/16 00:09:24 Yeah, this is one of the tricky aspects of having
2781 FOR_EACH_OBSERVER(WebContentsObserver, observers_, 2782 FOR_EACH_OBSERVER(WebContentsObserver, observers_,
2782 DidStartNavigation(navigation_handle)); 2783 DidStartNavigation(navigation_handle));
2783 } 2784 }
2784 2785
2785 void WebContentsImpl::DidRedirectNavigation( 2786 void WebContentsImpl::DidRedirectNavigation(
2786 NavigationHandle* navigation_handle) { 2787 NavigationHandle* navigation_handle) {
2787 FOR_EACH_OBSERVER(WebContentsObserver, observers_, 2788 FOR_EACH_OBSERVER(WebContentsObserver, observers_,
2788 DidRedirectNavigation(navigation_handle)); 2789 DidRedirectNavigation(navigation_handle));
2789 } 2790 }
2790 2791
(...skipping 1836 matching lines...) Expand 10 before | Expand all | Expand 10 after
4627 return NULL; 4628 return NULL;
4628 } 4629 }
4629 4630
4630 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { 4631 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) {
4631 force_disable_overscroll_content_ = force_disable; 4632 force_disable_overscroll_content_ = force_disable;
4632 if (view_) 4633 if (view_)
4633 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); 4634 view_->SetOverscrollControllerEnabled(CanOverscrollContent());
4634 } 4635 }
4635 4636
4636 } // namespace content 4637 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698