Chromium Code Reviews| 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 1575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1586 #endif | 1586 #endif |
| 1587 return false; | 1587 return false; |
| 1588 } | 1588 } |
| 1589 | 1589 |
| 1590 bool WebContentsImpl::PreHandleGestureEvent( | 1590 bool WebContentsImpl::PreHandleGestureEvent( |
| 1591 const blink::WebGestureEvent& event) { | 1591 const blink::WebGestureEvent& event) { |
| 1592 return delegate_ && delegate_->PreHandleGestureEvent(this, event); | 1592 return delegate_ && delegate_->PreHandleGestureEvent(this, event); |
| 1593 } | 1593 } |
| 1594 | 1594 |
| 1595 RenderWidgetHostInputEventRouter* WebContentsImpl::GetInputEventRouter() { | 1595 RenderWidgetHostInputEventRouter* WebContentsImpl::GetInputEventRouter() { |
| 1596 // Currently only supported in site per process mode (--site-per-process). | 1596 if (!is_being_destroyed_ && GetOuterWebContents()) |
| 1597 if (!rwh_input_event_router_.get() && !is_being_destroyed_ && | 1597 return GetOuterWebContents()->GetInputEventRouter(); |
|
kenrb
2015/11/05 17:05:26
If we create an input event router before being at
wjmaclean
2015/11/05 17:46:16
Yes, at present we do leave these around. I though
| |
| 1598 SiteIsolationPolicy::AreCrossProcessFramesPossible()) | 1598 |
| 1599 if (!rwh_input_event_router_.get() && !is_being_destroyed_) | |
| 1599 rwh_input_event_router_.reset(new RenderWidgetHostInputEventRouter); | 1600 rwh_input_event_router_.reset(new RenderWidgetHostInputEventRouter); |
| 1600 return rwh_input_event_router_.get(); | 1601 return rwh_input_event_router_.get(); |
| 1601 } | 1602 } |
| 1602 | 1603 |
| 1603 void WebContentsImpl::ReplicatePageFocus(bool is_focused) { | 1604 void WebContentsImpl::ReplicatePageFocus(bool is_focused) { |
| 1604 // Focus loss may occur while this WebContents is being destroyed. Don't | 1605 // Focus loss may occur while this WebContents is being destroyed. Don't |
| 1605 // send the message in this case, as the main frame's RenderFrameHost and | 1606 // send the message in this case, as the main frame's RenderFrameHost and |
| 1606 // other state has already been cleared. | 1607 // other state has already been cleared. |
| 1607 if (is_being_destroyed_) | 1608 if (is_being_destroyed_) |
| 1608 return; | 1609 return; |
| (...skipping 3070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4679 return NULL; | 4680 return NULL; |
| 4680 } | 4681 } |
| 4681 | 4682 |
| 4682 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { | 4683 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { |
| 4683 force_disable_overscroll_content_ = force_disable; | 4684 force_disable_overscroll_content_ = force_disable; |
| 4684 if (view_) | 4685 if (view_) |
| 4685 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); | 4686 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); |
| 4686 } | 4687 } |
| 4687 | 4688 |
| 4688 } // namespace content | 4689 } // namespace content |
| OLD | NEW |