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

Unified Diff: chrome/browser/renderer_host/render_view_host_delegate.h

Issue 400012: Refactor the keyboard events handling code related to RenderViewHostDelegate:... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years 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
« no previous file with comments | « chrome/browser/renderer_host/render_view_host.cc ('k') | chrome/browser/renderer_host/render_widget_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/render_view_host_delegate.h
===================================================================
--- chrome/browser/renderer_host/render_view_host_delegate.h (revision 34219)
+++ chrome/browser/renderer_host/render_view_host_delegate.h (working copy)
@@ -126,15 +126,18 @@
// true, it means the focus was retrieved by doing a Shift-Tab.
virtual void TakeFocus(bool reverse) = 0;
- // Returns whether the event is a reserved keyboard shortcut that should not
- // be sent to the renderer.
- virtual bool IsReservedAccelerator(const NativeWebKeyboardEvent& event) = 0;
+ // Callback to give the browser a chance to handle the specified keyboard
+ // event before sending it to the renderer.
+ // Returns true if the |event| was handled. 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) = 0;
// Callback to inform the browser that the renderer did not process the
// specified events. This gives an opportunity to the browser to process the
// event (used for keyboard shortcuts).
- // Returns true if the event was handled.
- virtual bool HandleKeyboardEvent(const NativeWebKeyboardEvent& event) = 0;
+ virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event) = 0;
// Notifications about mouse events in this view. This is useful for
// implementing global 'on hover' features external to the view.
« no previous file with comments | « chrome/browser/renderer_host/render_view_host.cc ('k') | chrome/browser/renderer_host/render_widget_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698