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

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

Issue 10377158: Move keyboard related methods from RenderViewHostDelegate to a new RenderWidgetHostDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove crbug link Created 8 years, 7 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 5a2ee7e4364a73965e06f7968400dd8234b9f41e..790de8f1aeca5757cbc5acde6eb71ff02ab15ae9 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -48,6 +48,7 @@ struct WebScreenInfo;
namespace content {
+class RenderWidgetHostDelegate;
class RenderWidgetHostViewPort;
class TapSuppressionController;
@@ -58,7 +59,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost,
public:
// routing_id can be MSG_ROUTING_NONE, in which case the next available
// routing id is taken from the RenderProcessHost.
- RenderWidgetHostImpl(RenderProcessHost* process, int routing_id);
+ RenderWidgetHostImpl(RenderWidgetHostDelegate* delegate,
+ RenderProcessHost* process,
+ int routing_id);
virtual ~RenderWidgetHostImpl();
// Use RenderWidgetHostImpl::From(rwh) to downcast a
@@ -377,23 +380,11 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost,
// when accelerated compositing is enabled.
gfx::GLSurfaceHandle GetCompositingSurface();
- // Called to handled a keyboard event before sending it to the renderer.
- // This is overridden by RenderViewHost to send upwards to its delegate.
- // Returns true if the event was handled, and then the keyboard event will
- // not be sent to the renderer anymore. Otherwise, if the |event| would
- // be handled in HandleKeyboardEvent() method as a normal keyboard shortcut,
- // |*is_keyboard_shortcut| should be set to true.
- virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event,
- bool* is_keyboard_shortcut);
-
// "RenderWidgetHostDelegate" ------------------------------------------------
// There is no RenderWidgetHostDelegate but the following methods serve the
// same purpose. They are overridden by RenderViewHost to send upwards to its
// delegate.
- // Called when a keyboard event was not processed by the renderer.
- virtual void UnhandledKeyboardEvent(const NativeWebKeyboardEvent& event) {}
-
// Called when a mousewheel event was not processed by the renderer.
virtual void UnhandledWheelEvent(const WebKit::WebMouseWheelEvent& event) {}
@@ -561,6 +552,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost,
// which may get in recursive loops).
void DelayedAutoResized();
+ // Our delegate, which wants to know mainly about keyboard events.
+ RenderWidgetHostDelegate* delegate_;
+
// Created during construction but initialized during Init*(). Therefore, it
// is guaranteed never to be NULL, but its channel may be NULL if the
// renderer crashed, so you must always check that.
« no previous file with comments | « content/browser/renderer_host/render_widget_host_delegate.cc ('k') | content/browser/renderer_host/render_widget_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698