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