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 2768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2779 return true; | 2779 return true; |
2780 return delegate_ && delegate_->ShouldFocusLocationBarByDefault(this); | 2780 return delegate_ && delegate_->ShouldFocusLocationBarByDefault(this); |
2781 } | 2781 } |
2782 | 2782 |
2783 void WebContentsImpl::SetFocusToLocationBar(bool select_all) { | 2783 void WebContentsImpl::SetFocusToLocationBar(bool select_all) { |
2784 if (delegate_) | 2784 if (delegate_) |
2785 delegate_->SetFocusToLocationBar(select_all); | 2785 delegate_->SetFocusToLocationBar(select_all); |
2786 } | 2786 } |
2787 | 2787 |
2788 void WebContentsImpl::DidStartNavigation(NavigationHandle* navigation_handle) { | 2788 void WebContentsImpl::DidStartNavigation(NavigationHandle* navigation_handle) { |
| 2789 static_cast<NavigationHandleImpl*>(navigation_handle)->set_web_contents(this); |
2789 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 2790 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
2790 DidStartNavigation(navigation_handle)); | 2791 DidStartNavigation(navigation_handle)); |
2791 } | 2792 } |
2792 | 2793 |
2793 void WebContentsImpl::DidRedirectNavigation( | 2794 void WebContentsImpl::DidRedirectNavigation( |
2794 NavigationHandle* navigation_handle) { | 2795 NavigationHandle* navigation_handle) { |
2795 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 2796 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
2796 DidRedirectNavigation(navigation_handle)); | 2797 DidRedirectNavigation(navigation_handle)); |
2797 } | 2798 } |
2798 | 2799 |
(...skipping 1836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4635 return NULL; | 4636 return NULL; |
4636 } | 4637 } |
4637 | 4638 |
4638 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { | 4639 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { |
4639 force_disable_overscroll_content_ = force_disable; | 4640 force_disable_overscroll_content_ = force_disable; |
4640 if (view_) | 4641 if (view_) |
4641 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); | 4642 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); |
4642 } | 4643 } |
4643 | 4644 |
4644 } // namespace content | 4645 } // namespace content |
OLD | NEW |