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

Unified Diff: content/browser/renderer_host/render_widget_host_impl.h

Issue 23416003: Add content::RenderWidgetHost::MouseEventCallback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 4 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/browser/renderer_host/render_widget_host_impl.h
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
index 2004c0b663c8f5e332a90f44c9839242a230ffde..156188bf4fc5d647361fb666950d3ee8de1a59c6 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -175,6 +175,8 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost,
virtual void WasResized() OVERRIDE;
virtual void AddKeyboardListener(KeyboardListener* listener) OVERRIDE;
virtual void RemoveKeyboardListener(KeyboardListener* listener) OVERRIDE;
+ virtual void AddMouseListener(MouseListener* listener) OVERRIDE;
+ virtual void RemoveMouseListener(MouseListener* listener) OVERRIDE;
virtual void GetWebScreenInfo(WebKit::WebScreenInfo* result) OVERRIDE;
virtual void GetSnapshotFromRenderer(
const gfx::Rect& src_subrect,
@@ -705,6 +707,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost,
// widgets that don't have focus to still handle key presses.
bool KeyPressListenersHandleEvent(const NativeWebKeyboardEvent& event);
+ // Give mouse listeners a chance to handle this mouse event.
+ bool MouseListenersHandleEvent(const WebKit::WebMouseEvent& event);
+
// InputRouterClient
virtual InputEventAckState FilterInputEvent(
const WebKit::WebInputEvent& event,
@@ -824,6 +829,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost,
// Keyboard event listeners.
ObserverList<KeyboardListener> keyboard_listeners_;
+ // Mouse event listeners.
+ ObserverList<MouseListener> mouse_listeners_;
+
// If true, then we should repaint when restoring even if we have a
// backingstore. This flag is set to true if we receive a paint message
// while is_hidden_ to true. Even though we tell the render widget to hide
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_impl.cc » ('j') | content/public/browser/mouse_listener.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698