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

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: Addressing reviewer feedback 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..04030e46b493935b07f451f041d34f641a861e99 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 DidStartUserInteraction,
+ // with the appropriate filtering by input event type.
virtual void DidGetUserGesture() {}
+ // Called when there has been direct user interaction with the web contents.
+ // Direct user input includes 1) any mouse down event; 2) any mouse wheel
+ // event; 3) any raw key down event; and 4) any gesture tap event.
+ virtual void DidStartUserInteraction(const blink::WebInputEvent::Type type) {}
nasko 2015/10/26 17:18:44 Any method that has a Start in its name should hav
dominickn 2015/10/27 07:03:57 The naming was a reviewer suggestion. I've changed
+
// 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