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 4165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4176 | 4176 |
4177 void WebContentsImpl::OnUserGesture() { | 4177 void WebContentsImpl::OnUserGesture() { |
4178 // Notify observers. | 4178 // Notify observers. |
4179 FOR_EACH_OBSERVER(WebContentsObserver, observers_, DidGetUserGesture()); | 4179 FOR_EACH_OBSERVER(WebContentsObserver, observers_, DidGetUserGesture()); |
4180 | 4180 |
4181 ResourceDispatcherHostImpl* rdh = ResourceDispatcherHostImpl::Get(); | 4181 ResourceDispatcherHostImpl* rdh = ResourceDispatcherHostImpl::Get(); |
4182 if (rdh) // NULL in unittests. | 4182 if (rdh) // NULL in unittests. |
4183 rdh->OnUserGesture(this); | 4183 rdh->OnUserGesture(this); |
4184 } | 4184 } |
4185 | 4185 |
| 4186 void WebContentsImpl::OnUserInteraction(const blink::WebInputEvent::Type type) { |
| 4187 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
| 4188 DidGetUserInteraction(type)); |
| 4189 } |
| 4190 |
4186 void WebContentsImpl::OnIgnoredUIEvent() { | 4191 void WebContentsImpl::OnIgnoredUIEvent() { |
4187 // Notify observers. | 4192 // Notify observers. |
4188 FOR_EACH_OBSERVER(WebContentsObserver, observers_, DidGetIgnoredUIEvent()); | 4193 FOR_EACH_OBSERVER(WebContentsObserver, observers_, DidGetIgnoredUIEvent()); |
4189 } | 4194 } |
4190 | 4195 |
4191 void WebContentsImpl::RendererUnresponsive(RenderViewHost* render_view_host) { | 4196 void WebContentsImpl::RendererUnresponsive(RenderViewHost* render_view_host) { |
4192 // Don't show hung renderer dialog for a swapped out RVH. | 4197 // Don't show hung renderer dialog for a swapped out RVH. |
4193 if (render_view_host != GetRenderViewHost()) | 4198 if (render_view_host != GetRenderViewHost()) |
4194 return; | 4199 return; |
4195 | 4200 |
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4640 return NULL; | 4645 return NULL; |
4641 } | 4646 } |
4642 | 4647 |
4643 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { | 4648 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { |
4644 force_disable_overscroll_content_ = force_disable; | 4649 force_disable_overscroll_content_ = force_disable; |
4645 if (view_) | 4650 if (view_) |
4646 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); | 4651 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); |
4647 } | 4652 } |
4648 | 4653 |
4649 } // namespace content | 4654 } // namespace content |
OLD | NEW |