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/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 2629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2640 // Now that something has committed, we don't need to track whether the | 2640 // Now that something has committed, we don't need to track whether the |
2641 // initial page has been accessed. | 2641 // initial page has been accessed. |
2642 has_accessed_initial_document_ = false; | 2642 has_accessed_initial_document_ = false; |
2643 | 2643 |
2644 // If we navigate off the page, close all JavaScript dialogs. | 2644 // If we navigate off the page, close all JavaScript dialogs. |
2645 if (dialog_manager_ && !details.is_in_page) | 2645 if (dialog_manager_ && !details.is_in_page) |
2646 dialog_manager_->CancelActiveAndPendingDialogs(this); | 2646 dialog_manager_->CancelActiveAndPendingDialogs(this); |
2647 | 2647 |
2648 // Notify observers about navigation. | 2648 // Notify observers about navigation. |
2649 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 2649 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
2650 DidNavigateAnyFrame(details, params)); | 2650 DidNavigateAnyFrame(render_frame_host, details, params)); |
2651 } | 2651 } |
2652 | 2652 |
2653 void WebContentsImpl::SetMainFrameMimeType(const std::string& mime_type) { | 2653 void WebContentsImpl::SetMainFrameMimeType(const std::string& mime_type) { |
2654 contents_mime_type_ = mime_type; | 2654 contents_mime_type_ = mime_type; |
2655 } | 2655 } |
2656 | 2656 |
2657 bool WebContentsImpl::CanOverscrollContent() const { | 2657 bool WebContentsImpl::CanOverscrollContent() const { |
2658 // Disable overscroll when touch emulation is on. See crbug.com/369938. | 2658 // Disable overscroll when touch emulation is on. See crbug.com/369938. |
2659 if (force_disable_overscroll_content_) | 2659 if (force_disable_overscroll_content_) |
2660 return false; | 2660 return false; |
(...skipping 1712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4373 node->render_manager()->ResumeResponseDeferredAtStart(); | 4373 node->render_manager()->ResumeResponseDeferredAtStart(); |
4374 } | 4374 } |
4375 | 4375 |
4376 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { | 4376 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { |
4377 force_disable_overscroll_content_ = force_disable; | 4377 force_disable_overscroll_content_ = force_disable; |
4378 if (view_) | 4378 if (view_) |
4379 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); | 4379 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); |
4380 } | 4380 } |
4381 | 4381 |
4382 } // namespace content | 4382 } // namespace content |
OLD | NEW |