| 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 1579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1590 #endif | 1590 #endif |
| 1591 return false; | 1591 return false; |
| 1592 } | 1592 } |
| 1593 | 1593 |
| 1594 bool WebContentsImpl::PreHandleGestureEvent( | 1594 bool WebContentsImpl::PreHandleGestureEvent( |
| 1595 const blink::WebGestureEvent& event) { | 1595 const blink::WebGestureEvent& event) { |
| 1596 return delegate_ && delegate_->PreHandleGestureEvent(this, event); | 1596 return delegate_ && delegate_->PreHandleGestureEvent(this, event); |
| 1597 } | 1597 } |
| 1598 | 1598 |
| 1599 RenderWidgetHostInputEventRouter* WebContentsImpl::GetInputEventRouter() { | 1599 RenderWidgetHostInputEventRouter* WebContentsImpl::GetInputEventRouter() { |
| 1600 // Currently only supported in site per process mode (--site-per-process). | 1600 if (!is_being_destroyed_ && GetOuterWebContents()) |
| 1601 if (!rwh_input_event_router_.get() && !is_being_destroyed_ && | 1601 return GetOuterWebContents()->GetInputEventRouter(); |
| 1602 SiteIsolationPolicy::AreCrossProcessFramesPossible()) | 1602 |
| 1603 if (!rwh_input_event_router_.get() && !is_being_destroyed_) |
| 1603 rwh_input_event_router_.reset(new RenderWidgetHostInputEventRouter); | 1604 rwh_input_event_router_.reset(new RenderWidgetHostInputEventRouter); |
| 1604 return rwh_input_event_router_.get(); | 1605 return rwh_input_event_router_.get(); |
| 1605 } | 1606 } |
| 1606 | 1607 |
| 1607 void WebContentsImpl::ReplicatePageFocus(bool is_focused) { | 1608 void WebContentsImpl::ReplicatePageFocus(bool is_focused) { |
| 1608 // Focus loss may occur while this WebContents is being destroyed. Don't | 1609 // Focus loss may occur while this WebContents is being destroyed. Don't |
| 1609 // send the message in this case, as the main frame's RenderFrameHost and | 1610 // send the message in this case, as the main frame's RenderFrameHost and |
| 1610 // other state has already been cleared. | 1611 // other state has already been cleared. |
| 1611 if (is_being_destroyed_) | 1612 if (is_being_destroyed_) |
| 1612 return; | 1613 return; |
| (...skipping 3166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4779 return NULL; | 4780 return NULL; |
| 4780 } | 4781 } |
| 4781 | 4782 |
| 4782 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { | 4783 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { |
| 4783 force_disable_overscroll_content_ = force_disable; | 4784 force_disable_overscroll_content_ = force_disable; |
| 4784 if (view_) | 4785 if (view_) |
| 4785 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); | 4786 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); |
| 4786 } | 4787 } |
| 4787 | 4788 |
| 4788 } // namespace content | 4789 } // namespace content |
| OLD | NEW |