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

Unified Diff: chrome/browser/cocoa/html_dialog_window_controller.mm

Issue 525112: Implement HandleKeyboardEvent() method in HtmlDialog implementations.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/gtk/html_dialog_gtk.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/html_dialog_window_controller.mm
===================================================================
--- chrome/browser/cocoa/html_dialog_window_controller.mm (revision 35900)
+++ chrome/browser/cocoa/html_dialog_window_controller.mm (working copy)
@@ -44,6 +44,7 @@
// HtmlDialogTabContentsDelegate declarations.
virtual void MoveContents(TabContents* source, const gfx::Rect& pos);
virtual void ToolbarSizeChanged(TabContents* source, bool is_animating);
+ virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event);
private:
HtmlDialogWindowController* controller_; // weak
@@ -168,6 +169,20 @@
// TODO(akalin): Figure out what to do here.
}
+// A simplified version of BrowserWindowCocoa::HandleKeyboardEvent().
+// We don't handle global keyboard shortcuts here, but that's fine since
+// they're all browser-specific. (This may change in the future.)
+void HtmlDialogWindowDelegateBridge::HandleKeyboardEvent(
+ const NativeWebKeyboardEvent& event) {
+ if (event.skip_in_browser || event.type == NativeWebKeyboardEvent::Char)
+ return;
+
+ ChromeEventProcessingWindow* event_window =
+ static_cast<ChromeEventProcessingWindow*>([controller_ window]);
+
+ [event_window redispatchEvent:event.os_event];
+}
+
@implementation HtmlDialogWindowController (InternalAPI)
// This gets called whenever a chrome-specific keyboard shortcut is performed
Property changes on: chrome/browser/cocoa/html_dialog_window_controller.mm
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « no previous file | chrome/browser/gtk/html_dialog_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698