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

Unified Diff: chrome/browser/browser_window.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/browser_keyevents_browsertest.cc ('k') | chrome/browser/chromeos/main_menu.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_window.h
===================================================================
--- chrome/browser/browser_window.h (revision 34219)
+++ chrome/browser/browser_window.h (working copy)
@@ -267,10 +267,18 @@
// Shows the app menu (for accessibility).
virtual void ShowAppMenu() = 0;
- // Returns the id of the keyboard accelerator associated with the given
- // keyboard event if one exists, otherwise -1.
- virtual int GetCommandId(const NativeWebKeyboardEvent& event) = 0;
+ // Allows the BrowserWindow object 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;
+ // Allows the BrowserWindow object to handle the specified keyboard event,
+ // if the renderer did not process it.
+ virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event) = 0;
+
// Shows the create web app shortcut dialog box.
virtual void ShowCreateShortcutsDialog(TabContents* tab_contents) = 0;
« no previous file with comments | « chrome/browser/browser_keyevents_browsertest.cc ('k') | chrome/browser/chromeos/main_menu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698