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

Unified Diff: chrome/common/extensions/command.cc

Issue 674263003: Add remaining text/caret navigation commands to ChromeVox Next. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@integrate_cursor
Patch Set: kMaxTokenSize Created 6 years, 2 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/resources/chromeos/chromevox/testing/mock_tts.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/command.cc
diff --git a/chrome/common/extensions/command.cc b/chrome/common/extensions/command.cc
index 8a07d95f566ea3950eeabc34bea547294cf17c7a..ff58db820e62876118f998aff6387ad436c35f82 100644
--- a/chrome/common/extensions/command.cc
+++ b/chrome/common/extensions/command.cc
@@ -28,6 +28,12 @@ static const char kMissing[] = "Missing";
static const char kCommandKeyNotSupported[] =
"Command key is not supported. Note: Ctrl means Command on Mac";
+#if defined(OS_CHROMEOS)
+static const int kMaxTokenSize = 4;
Finnur 2014/10/30 10:04:06 Nit: I'd comment this with: // ChromeOS supports a
David Tseng 2014/10/30 17:01:46 Done.
+#else
+static const int kMaxTokenSize = 3;
+#endif // OS_CHROMEOS
+
bool IsNamedCommand(const std::string& command_name) {
return command_name != values::kPageActionCommandEvent &&
command_name != values::kBrowserActionCommandEvent;
@@ -62,7 +68,7 @@ ui::Accelerator ParseImpl(const std::string& accelerator,
base::SplitString(accelerator, '+', &tokens);
if (tokens.size() == 0 ||
(tokens.size() == 1 && DoesRequireModifier(accelerator)) ||
- tokens.size() > 3) {
+ tokens.size() > kMaxTokenSize) {
*error = ErrorUtils::FormatErrorMessageUTF16(
errors::kInvalidKeyBinding,
base::IntToString(index),
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/testing/mock_tts.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698