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 1586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1597 #endif | 1597 #endif |
| 1598 return false; | 1598 return false; |
| 1599 } | 1599 } |
| 1600 | 1600 |
| 1601 bool WebContentsImpl::PreHandleGestureEvent( | 1601 bool WebContentsImpl::PreHandleGestureEvent( |
| 1602 const blink::WebGestureEvent& event) { | 1602 const blink::WebGestureEvent& event) { |
| 1603 return delegate_ && delegate_->PreHandleGestureEvent(this, event); | 1603 return delegate_ && delegate_->PreHandleGestureEvent(this, event); |
| 1604 } | 1604 } |
| 1605 | 1605 |
| 1606 RenderWidgetHostInputEventRouter* WebContentsImpl::GetInputEventRouter() { | 1606 RenderWidgetHostInputEventRouter* WebContentsImpl::GetInputEventRouter() { |
| 1607 // Currently only supported in site per process mode (--site-per-process). | 1607 if (!is_being_destroyed_ && GetOuterWebContents()) |
| 1608 if (!rwh_input_event_router_.get() && !is_being_destroyed_ && | 1608 return GetOuterWebContents()->GetInputEventRouter(); |
| 1609 SiteIsolationPolicy::AreCrossProcessFramesPossible()) | 1609 |
| 1610 if (!rwh_input_event_router_.get() && !is_being_destroyed_) | |
| 1610 rwh_input_event_router_.reset(new RenderWidgetHostInputEventRouter); | 1611 rwh_input_event_router_.reset(new RenderWidgetHostInputEventRouter); |
|
Charlie Reis
2015/11/30 18:09:12
Before this CL, we never created this in default C
wjmaclean
2015/12/10 16:09:07
This CL is targeted to (in the short term) fixing
Charlie Reis
2015/12/10 21:58:14
This doesn't sound safe to me.
If I read this cor
| |
| 1611 return rwh_input_event_router_.get(); | 1612 return rwh_input_event_router_.get(); |
| 1612 } | 1613 } |
| 1613 | 1614 |
| 1614 void WebContentsImpl::ReplicatePageFocus(bool is_focused) { | 1615 void WebContentsImpl::ReplicatePageFocus(bool is_focused) { |
| 1615 // Focus loss may occur while this WebContents is being destroyed. Don't | 1616 // Focus loss may occur while this WebContents is being destroyed. Don't |
| 1616 // send the message in this case, as the main frame's RenderFrameHost and | 1617 // send the message in this case, as the main frame's RenderFrameHost and |
| 1617 // other state has already been cleared. | 1618 // other state has already been cleared. |
| 1618 if (is_being_destroyed_) | 1619 if (is_being_destroyed_) |
| 1619 return; | 1620 return; |
| 1620 | 1621 |
| (...skipping 3182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4803 return NULL; | 4804 return NULL; |
| 4804 } | 4805 } |
| 4805 | 4806 |
| 4806 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { | 4807 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { |
| 4807 force_disable_overscroll_content_ = force_disable; | 4808 force_disable_overscroll_content_ = force_disable; |
| 4808 if (view_) | 4809 if (view_) |
| 4809 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); | 4810 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); |
| 4810 } | 4811 } |
| 4811 | 4812 |
| 4812 } // namespace content | 4813 } // namespace content |
| OLD | NEW |