Index: chrome/browser/renderer_host/render_widget_host_view.h |
=================================================================== |
--- chrome/browser/renderer_host/render_widget_host_view.h (版本 21941) |
+++ chrome/browser/renderer_host/render_widget_host_view.h (工作副本) |
@@ -22,6 +22,7 @@ |
class RenderProcessHost; |
class RenderWidgetHost; |
class WebCursor; |
+class NativeWebKeyboardEvent; |
struct WebMenuItem; |
// RenderWidgetHostView is an interface implemented by an object that acts as |
@@ -168,6 +169,15 @@ |
virtual void PluginProcessCrashed(base::ProcessId pid) { } |
+ // Called by RenderWidgetHost when a keyboard event was not processed by the |
+ // renderer. Subclasses may override this method to handle the events, for |
+ // example to match the events against system defined key bindings and |
+ // translate them into edit commands. |
+ // Returns true if the event is handled, otherwise returns false. |
+ virtual bool UnhandledKeyboardEvent(const NativeWebKeyboardEvent& event) { |
+ return false; |
+ } |
+ |
void set_activatable(bool activatable) { |
activatable_ = activatable; |
} |