Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(628)

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 1388293002: Notify WebContentsObservers of user interactions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing nits Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/public/browser/web_contents_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698