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

Unified Diff: ui/base/accelerators/accelerator.cc

Issue 10824307: Port Extension Commands to Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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
Index: ui/base/accelerators/accelerator.cc
===================================================================
--- ui/base/accelerators/accelerator.cc (revision 151684)
+++ ui/base/accelerators/accelerator.cc (working copy)
@@ -17,7 +17,7 @@
#include "grit/ui_strings.h"
#include "ui/base/l10n/l10n_util.h"
-#if !defined(OS_WIN) && defined(USE_AURA)
+#if !defined(OS_WIN) && (defined(USE_AURA) || defined(OS_MACOSX))
#include "ui/base/keycodes/keyboard_code_conversion.h"
#endif
@@ -146,11 +146,10 @@
else
key = LOWORD(::MapVirtualKeyW(key_code_, MAPVK_VK_TO_CHAR));
shortcut += key;
-#elif defined(USE_AURA)
+#elif defined(USE_AURA) || defined(OS_MACOSX)
const uint16 c = GetCharacterFromKeyCode(key_code_, false);
- if (c != 0) {
+ if (c != 0)
shortcut += static_cast<string16::value_type>(base::ToUpperASCII(c));
- }
#elif defined(TOOLKIT_GTK)
const gchar* name = NULL;
switch (key_code_) {

Powered by Google App Engine
This is Rietveld 408576698