| 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 1567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1578 if (delegate_) { | 1578 if (delegate_) { |
| 1579 gfx::Rect initial_pos; | 1579 gfx::Rect initial_pos; |
| 1580 delegate_->AddNewContents( | 1580 delegate_->AddNewContents( |
| 1581 this, new_contents, params.disposition, initial_pos, | 1581 this, new_contents, params.disposition, initial_pos, |
| 1582 params.user_gesture, &was_blocked); | 1582 params.user_gesture, &was_blocked); |
| 1583 } | 1583 } |
| 1584 if (!was_blocked) { | 1584 if (!was_blocked) { |
| 1585 OpenURLParams open_params(params.target_url, | 1585 OpenURLParams open_params(params.target_url, |
| 1586 Referrer(), | 1586 Referrer(), |
| 1587 CURRENT_TAB, | 1587 CURRENT_TAB, |
| 1588 PAGE_TRANSITION_LINK, | 1588 ui::PAGE_TRANSITION_LINK, |
| 1589 true /* is_renderer_initiated */); | 1589 true /* is_renderer_initiated */); |
| 1590 open_params.user_gesture = params.user_gesture; | 1590 open_params.user_gesture = params.user_gesture; |
| 1591 new_contents->OpenURL(open_params); | 1591 new_contents->OpenURL(open_params); |
| 1592 } | 1592 } |
| 1593 } | 1593 } |
| 1594 } | 1594 } |
| 1595 | 1595 |
| 1596 void WebContentsImpl::CreateNewWidget(int render_process_id, | 1596 void WebContentsImpl::CreateNewWidget(int render_process_id, |
| 1597 int route_id, | 1597 int route_id, |
| 1598 blink::WebPopupType popup_type) { | 1598 blink::WebPopupType popup_type) { |
| (...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2567 FOR_EACH_OBSERVER( | 2567 FOR_EACH_OBSERVER( |
| 2568 WebContentsObserver, | 2568 WebContentsObserver, |
| 2569 observers_, | 2569 observers_, |
| 2570 ProvisionalChangeToMainFrameUrl(validated_target_url, | 2570 ProvisionalChangeToMainFrameUrl(validated_target_url, |
| 2571 render_frame_host)); | 2571 render_frame_host)); |
| 2572 } | 2572 } |
| 2573 | 2573 |
| 2574 void WebContentsImpl::DidCommitProvisionalLoad( | 2574 void WebContentsImpl::DidCommitProvisionalLoad( |
| 2575 RenderFrameHostImpl* render_frame_host, | 2575 RenderFrameHostImpl* render_frame_host, |
| 2576 const GURL& url, | 2576 const GURL& url, |
| 2577 PageTransition transition_type) { | 2577 ui::PageTransition transition_type) { |
| 2578 // Notify observers about the commit of the provisional load. | 2578 // Notify observers about the commit of the provisional load. |
| 2579 FOR_EACH_OBSERVER(WebContentsObserver, | 2579 FOR_EACH_OBSERVER(WebContentsObserver, |
| 2580 observers_, | 2580 observers_, |
| 2581 DidCommitProvisionalLoadForFrame( | 2581 DidCommitProvisionalLoadForFrame( |
| 2582 render_frame_host, url, transition_type)); | 2582 render_frame_host, url, transition_type)); |
| 2583 } | 2583 } |
| 2584 | 2584 |
| 2585 void WebContentsImpl::DidNavigateMainFramePreCommit( | 2585 void WebContentsImpl::DidNavigateMainFramePreCommit( |
| 2586 bool navigation_is_within_page) { | 2586 bool navigation_is_within_page) { |
| 2587 // Ensure fullscreen mode is exited before committing the navigation to a | 2587 // Ensure fullscreen mode is exited before committing the navigation to a |
| (...skipping 1778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4366 node->render_manager()->ResumeResponseDeferredAtStart(); | 4366 node->render_manager()->ResumeResponseDeferredAtStart(); |
| 4367 } | 4367 } |
| 4368 | 4368 |
| 4369 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { | 4369 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { |
| 4370 force_disable_overscroll_content_ = force_disable; | 4370 force_disable_overscroll_content_ = force_disable; |
| 4371 if (view_) | 4371 if (view_) |
| 4372 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); | 4372 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); |
| 4373 } | 4373 } |
| 4374 | 4374 |
| 4375 } // namespace content | 4375 } // namespace content |
| OLD | NEW |