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

Unified Diff: content/public/browser/web_contents_observer.h

Issue 1388293002: Notify WebContentsObservers of user interactions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Inlining RenderWidgetHost::OnUserInteraction Created 5 years, 2 months 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 side-by-side diff with in-line comments
Download patch
Index: content/public/browser/web_contents_observer.h
diff --git a/content/public/browser/web_contents_observer.h b/content/public/browser/web_contents_observer.h
index c2fcffbe0f2efb50491184386b27a6aa11d21753..37f28b1191abe06936caf47801ade9828344e210 100644
--- a/content/public/browser/web_contents_observer.h
+++ b/content/public/browser/web_contents_observer.h
@@ -13,6 +13,7 @@
#include "content/public/common/security_style.h"
#include "ipc/ipc_listener.h"
#include "ipc/ipc_sender.h"
+#include "third_party/WebKit/public/web/WebInputEvent.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/base/page_transition_types.h"
#include "ui/base/window_open_disposition.h"
@@ -313,8 +314,15 @@ class CONTENT_EXPORT WebContentsObserver : public IPC::Listener,
virtual void NavigationStopped() {}
// This indicates that the next navigation was triggered by a user gesture.
+ // TODO(dominickn): remove this method in favor of DidGetUserInteraction,
+ // with the appropriate filtering by input event type.
virtual void DidGetUserGesture() {}
+ // Called when there has been direct user interaction with the WebContents.
+ // Direct user input includes 1) any mouse down event; 2) any raw key down
+ // event; and 3) any gesture tap event (including taps and scrolls).
+ virtual void DidGetUserInteraction(const blink::WebInputEvent::Type type) {}
+
// This method is invoked when a RenderViewHost of this WebContents was
// configured to ignore UI events, and an UI event took place.
virtual void DidGetIgnoredUIEvent() {}

Powered by Google App Engine
This is Rietveld 408576698