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

Unified Diff: chrome/browser/resources/chromeos/chromevox/cvox2/background/command_handler.js

Issue 2768703002: Wire up an api to darken screen for accessibility (Closed)
Patch Set: Braille command mapping. Created 3 years, 9 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: chrome/browser/resources/chromeos/chromevox/cvox2/background/command_handler.js
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/command_handler.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/command_handler.js
index f37c37318f0dc822ea013835bc0c7c5e487a6a26..09fd6d6c0366917adfd4bf598e4d212a0116fa5e 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/command_handler.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/command_handler.js
@@ -192,6 +192,20 @@ CommandHandler.onCommand = function(command) {
case 'showNextUpdatePage':
(new PanelCommand(PanelCommandType.UPDATE_NOTES)).send();
return false;
+ case 'darkenScreen':
+ // Called twice to ensure the cros end of the dbus message is in a good
dmazzoni 2017/03/24 16:02:40 I just think that detail should be handled lower d
David Tseng 2017/03/24 18:07:43 Ok, I see this as a one off api, so fine either wa
+ // state.
+ chrome.accessibilityPrivate.darkenScreen(false);
+ chrome.accessibilityPrivate.darkenScreen(true);
+ new Output().format('@darken_screen').go();
+ break;
+ case 'undarkenScreen':
+ // Called twice to ensure the cros end of the dbus message is in a good
+ // state.
+ chrome.accessibilityPrivate.darkenScreen(true);
+ chrome.accessibilityPrivate.darkenScreen(false);
+ new Output().format('@undarken_screen').go();
+ break;
default:
break;
}

Powered by Google App Engine
This is Rietveld 408576698