| Index: chrome/common/extensions/command.cc
|
| diff --git a/chrome/common/extensions/command.cc b/chrome/common/extensions/command.cc
|
| index faed130a24d346706276d48701a12913c113a21f..5ebf3fc015760d17c03edfc6793d27e7ab283ffc 100644
|
| --- a/chrome/common/extensions/command.cc
|
| +++ b/chrome/common/extensions/command.cc
|
| @@ -380,6 +380,17 @@ std::string Command::AcceleratorToString(const ui::Accelerator& accelerator) {
|
| return shortcut;
|
| }
|
|
|
| +// static
|
| +bool Command::IsMediaKey(const ui::Accelerator& accelerator) {
|
| + if (accelerator.modifiers() != 0)
|
| + return false;
|
| +
|
| + return (accelerator.key_code() == ui::VKEY_MEDIA_NEXT_TRACK ||
|
| + accelerator.key_code() == ui::VKEY_MEDIA_PREV_TRACK ||
|
| + accelerator.key_code() == ui::VKEY_MEDIA_PLAY_PAUSE ||
|
| + accelerator.key_code() == ui::VKEY_MEDIA_STOP);
|
| +}
|
| +
|
| bool Command::Parse(const base::DictionaryValue* command,
|
| const std::string& command_name,
|
| int index,
|
|
|