Chromium Code Reviews| 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; |
| } |