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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <cmath> | 9 #include <cmath> |
10 #include <utility> | 10 #include <utility> |
(...skipping 4561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4572 if (!HasMatchingWidgetHost(&frame_tree_, render_widget_host)) | 4572 if (!HasMatchingWidgetHost(&frame_tree_, render_widget_host)) |
4573 return; | 4573 return; |
4574 | 4574 |
4575 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 4575 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
4576 DidGetUserInteraction(type)); | 4576 DidGetUserInteraction(type)); |
4577 | 4577 |
4578 ResourceDispatcherHostImpl* rdh = ResourceDispatcherHostImpl::Get(); | 4578 ResourceDispatcherHostImpl* rdh = ResourceDispatcherHostImpl::Get(); |
4579 // Exclude scroll events as user gestures for resource load dispatches. | 4579 // Exclude scroll events as user gestures for resource load dispatches. |
4580 // rdh is NULL in unittests. | 4580 // rdh is NULL in unittests. |
4581 if (rdh && type != blink::WebInputEvent::MouseWheel) | 4581 if (rdh && type != blink::WebInputEvent::MouseWheel) |
4582 rdh->OnUserGesture(this); | 4582 rdh->OnUserGesture(); |
4583 } | 4583 } |
4584 | 4584 |
4585 void WebContentsImpl::OnIgnoredUIEvent() { | 4585 void WebContentsImpl::OnIgnoredUIEvent() { |
4586 // Notify observers. | 4586 // Notify observers. |
4587 FOR_EACH_OBSERVER(WebContentsObserver, observers_, DidGetIgnoredUIEvent()); | 4587 FOR_EACH_OBSERVER(WebContentsObserver, observers_, DidGetIgnoredUIEvent()); |
4588 } | 4588 } |
4589 | 4589 |
4590 void WebContentsImpl::RendererUnresponsive( | 4590 void WebContentsImpl::RendererUnresponsive( |
4591 RenderWidgetHostImpl* render_widget_host) { | 4591 RenderWidgetHostImpl* render_widget_host) { |
4592 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 4592 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5125 for (RenderViewHost* render_view_host : render_view_host_set) | 5125 for (RenderViewHost* render_view_host : render_view_host_set) |
5126 render_view_host->OnWebkitPreferencesChanged(); | 5126 render_view_host->OnWebkitPreferencesChanged(); |
5127 } | 5127 } |
5128 | 5128 |
5129 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( | 5129 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( |
5130 JavaScriptDialogManager* dialog_manager) { | 5130 JavaScriptDialogManager* dialog_manager) { |
5131 dialog_manager_ = dialog_manager; | 5131 dialog_manager_ = dialog_manager; |
5132 } | 5132 } |
5133 | 5133 |
5134 } // namespace content | 5134 } // namespace content |
OLD | NEW |