Commit 891e8627 authored by Akihiro Ota's avatar Akihiro Ota Committed by Commit Bot

Clean up: Fix indentation in background.js

Bug: N/A
Change-Id: I8e1ff49570262172e14dc0cb8876d03c0f8958a4
Ax-Relnotes: N/A
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2343766
Commit-Queue: Akihiro Ota <akihiroota@chromium.org>
Auto-Submit: Akihiro Ota <akihiroota@chromium.org>
Reviewed-by: default avatarDavid Tseng <dtseng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#796635}
parent c1dbb5f9
...@@ -161,46 +161,46 @@ Background = class extends ChromeVoxState { ...@@ -161,46 +161,46 @@ Background = class extends ChromeVoxState {
// ChromeVox starts. // ChromeVox starts.
sessionStorage.setItem('darkScreen', 'false'); sessionStorage.setItem('darkScreen', 'false');
// A self-contained class to start and stop progress sounds before any // A self-contained class to start and stop progress sounds before any
// speech has been generated on startup. This is important in cases where // speech has been generated on startup. This is important in cases where
// speech is severely delayed. // speech is severely delayed.
/** @implements {TtsCapturingEventListener} */ /** @implements {TtsCapturingEventListener} */
const ProgressPlayer = class { const ProgressPlayer = class {
constructor() { constructor() {
ChromeVox.tts.addCapturingEventListener(this); ChromeVox.tts.addCapturingEventListener(this);
ChromeVox.earcons.playEarcon(Earcon.CHROMEVOX_LOADING); ChromeVox.earcons.playEarcon(Earcon.CHROMEVOX_LOADING);
} }
/** @override */ /** @override */
onTtsStart() { onTtsStart() {
ChromeVox.earcons.playEarcon(Earcon.CHROMEVOX_LOADED); ChromeVox.earcons.playEarcon(Earcon.CHROMEVOX_LOADED);
ChromeVox.tts.removeCapturingEventListener(this); ChromeVox.tts.removeCapturingEventListener(this);
} }
/** @override */ /** @override */
onTtsEnd() {} onTtsEnd() {}
/** @override */ /** @override */
onTtsInterrupted() {} onTtsInterrupted() {}
}; };
new ProgressPlayer(); new ProgressPlayer();
chrome.commandLinePrivate.hasSwitch( chrome.commandLinePrivate.hasSwitch(
'enable-experimental-accessibility-chromevox-tutorial', (enabled) => { 'enable-experimental-accessibility-chromevox-tutorial', (enabled) => {
if (!enabled) { if (!enabled) {
return; return;
}
chrome.loginState.getSessionState((sessionState) => {
// If starting ChromeVox from OOBE, start the ChromeVox tutorial.
// Use a timeout to allow ChromeVox to initialize first.
if (sessionState ===
chrome.loginState.SessionState.IN_OOBE_SCREEN) {
setTimeout(() => {
(new PanelCommand(PanelCommandType.TUTORIAL)).send();
}, 1000);
} }
chrome.loginState.getSessionState((sessionState) => {
// If starting ChromeVox from OOBE, start the ChromeVox tutorial.
// Use a timeout to allow ChromeVox to initialize first.
if (sessionState ===
chrome.loginState.SessionState.IN_OOBE_SCREEN) {
setTimeout(() => {
(new PanelCommand(PanelCommandType.TUTORIAL)).send();
}, 1000);
}
});
}); });
});
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment