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

Unified Diff: chrome/browser/ui/panels/panel_cocoa.mm

Issue 10736037: Enable keyboard shortcuts and some menu commands for browserless Panels. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Synced Created 8 years, 5 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 | « chrome/browser/ui/panels/panel.cc ('k') | chrome/browser/ui/panels/panel_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/panels/panel_cocoa.mm
diff --git a/chrome/browser/ui/panels/panel_cocoa.mm b/chrome/browser/ui/panels/panel_cocoa.mm
index 6d64a4525114f17c103a54886a2e91f1e13be3c2..eb38a92fddef069d2515d290db2145553342408d 100644
--- a/chrome/browser/ui/panels/panel_cocoa.mm
+++ b/chrome/browser/ui/panels/panel_cocoa.mm
@@ -199,13 +199,19 @@ bool PanelCocoa::IsDrawingAttention() const {
bool PanelCocoa::PreHandlePanelKeyboardEvent(
const NativeWebKeyboardEvent& event, bool* is_keyboard_shortcut) {
- // TODO(jennb): any shortcut handling needed for Panel?
+ // No need to prehandle as no keys are reserved.
return false;
}
void PanelCocoa::HandlePanelKeyboardEvent(
const NativeWebKeyboardEvent& event) {
- // TODO(jennb): any shortcut handling needed for Panel?
+ if (event.skip_in_browser || event.type == NativeWebKeyboardEvent::Char)
+ return;
+
+ ChromeEventProcessingWindow* event_window =
+ static_cast<ChromeEventProcessingWindow*>([controller_ window]);
+ DCHECK([event_window isKindOfClass:[ChromeEventProcessingWindow class]]);
+ [event_window redispatchKeyEvent:event.os_event];
}
void PanelCocoa::FullScreenModeChanged(
« no previous file with comments | « chrome/browser/ui/panels/panel.cc ('k') | chrome/browser/ui/panels/panel_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698