summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions/command.h
diff options
context:
space:
mode:
authorfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-13 15:17:23 +0000
committerfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-13 15:17:23 +0000
commit645aea0956ca8dc3c823008be479c0ef3a4eacc7 (patch)
tree25596e85819c5e66a06239be0b5b5942c14ce6b4 /chrome/common/extensions/command.h
parent3b68abc4bef8cc2a144cec2af0ce034fbd7f8c03 (diff)
downloadchromium_src-645aea0956ca8dc3c823008be479c0ef3a4eacc7.zip
chromium_src-645aea0956ca8dc3c823008be479c0ef3a4eacc7.tar.gz
chromium_src-645aea0956ca8dc3c823008be479c0ef3a4eacc7.tar.bz2
Support more keys for the Commands API:
Arrow keys, Home, End, Ins, Del, PgUp, PgDwn, Tab, Comma and Period. Since the names of these keys are localizable (unlike A-Z, 0-9 -- that were the only keys we supported before), we need to stop relying on Accelerator::GetShortcutText (which localizes the string it returns). BUG=232884 TBR=willchan, sky Review URL: https://chromiumcodereview.appspot.com/14533005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@199730 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/command.h')
-rw-r--r--chrome/common/extensions/command.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/common/extensions/command.h b/chrome/common/extensions/command.h
index 8edcfdf..bccfe2a 100644
--- a/chrome/common/extensions/command.h
+++ b/chrome/common/extensions/command.h
@@ -36,6 +36,10 @@ class Command {
// a generic ui::Accelerator object will be returns (with key_code Unknown).
static ui::Accelerator StringToAccelerator(const std::string& accelerator);
+ // Returns the string representation of an accelerator without localizing the
+ // shortcut text (like accelerator::GetShortcutText() does).
+ static std::string AcceleratorToString(const ui::Accelerator& accelerator);
+
// Parse the command.
bool Parse(const base::DictionaryValue* command,
const std::string& command_name,