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

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: Cvox changes. 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..bb5839053c207cc0da9379d9a5d02db9d55b16d8 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':
+ chrome.automation.getDesktop(function(desktop) {
+ desktop.toggleDarkenScreen(false);
dmazzoni 2017/03/22 21:40:48 Why call it twice?
David Tseng 2017/03/22 22:51:38 The other end of the dbus message is sticky. So, i
+ desktop.toggleDarkenScreen(true);
+ });
+ new Output().format('@darken_screen').go();
+ break;
+ case 'undarkenScreen':
+ chrome.automation.getDesktop(function(desktop) {
+ desktop.toggleDarkenScreen(true);
+ desktop.toggleDarkenScreen(false);
+ });
+ new Output().format('@undarken_screen').go();
+ break;
default:
break;
}

Powered by Google App Engine
This is Rietveld 408576698