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

Side by Side Diff: chrome/browser/resources/chromeos/chromevox/cvox2/background/panel.js

Issue 2497723002: Show the tutorial during OOBE (Closed)
Patch Set: Fix test. Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/chromeos/accessibility/spoken_feedback_browsertest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview The ChromeVox panel and menus. 6 * @fileoverview The ChromeVox panel and menus.
7 */ 7 */
8 8
9 goog.provide('Panel'); 9 goog.provide('Panel');
10 10
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 document.addEventListener('keydown', Panel.onKeyDown, false); 132 document.addEventListener('keydown', Panel.onKeyDown, false);
133 document.addEventListener('mouseup', Panel.onMouseUp, false); 133 document.addEventListener('mouseup', Panel.onMouseUp, false);
134 window.addEventListener('blur', function(evt) { 134 window.addEventListener('blur', function(evt) {
135 if (evt.target != window || document.activeElement == document.body) 135 if (evt.target != window || document.activeElement == document.body)
136 return; 136 return;
137 137
138 Panel.closeMenusAndRestoreFocus(); 138 Panel.closeMenusAndRestoreFocus();
139 }, false); 139 }, false);
140 140
141 Panel.searchInput_.addEventListener('blur', Panel.onSearchInputBlur, false); 141 Panel.searchInput_.addEventListener('blur', Panel.onSearchInputBlur, false);
142
143 // If OOBE is showing, automatically trigger the tutorial.
144 chrome.automation.getDesktop(function(desktop) {
145 var loadCompleteType = chrome.automation.EventType.loadComplete;
146 var watchForOobe = function(evt) {
147 if (evt.target.url == 'chrome://oobe/oobe') {
148 desktop.removeEventListener(loadCompleteType, watchForOobe, false);
149 Panel.onTutorial();
150 }
151 };
152 desktop.addEventListener(loadCompleteType, watchForOobe, false);
153 });
142 }; 154 };
143 155
144 /** 156 /**
145 * Update the display based on prefs. 157 * Update the display based on prefs.
146 */ 158 */
147 Panel.updateFromPrefs = function() { 159 Panel.updateFromPrefs = function() {
148 if (Panel.searching_) { 160 if (Panel.searching_) {
149 this.speechContainer_.hidden = true; 161 this.speechContainer_.hidden = true;
150 this.brailleContainer_.hidden = true; 162 this.brailleContainer_.hidden = true;
151 this.searchContainer_.hidden = false; 163 this.searchContainer_.hidden = false;
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after
842 }, false); 854 }, false);
843 855
844 window.addEventListener('hashchange', function() { 856 window.addEventListener('hashchange', function() {
845 if (location.hash == '#fullscreen' || location.hash == '#focus') { 857 if (location.hash == '#fullscreen' || location.hash == '#focus') {
846 this.originalStickyState_ = cvox.ChromeVox.isStickyPrefOn; 858 this.originalStickyState_ = cvox.ChromeVox.isStickyPrefOn;
847 cvox.ChromeVox.isStickyPrefOn = false; 859 cvox.ChromeVox.isStickyPrefOn = false;
848 } else { 860 } else {
849 cvox.ChromeVox.isStickyPrefOn = this.originalStickyState_; 861 cvox.ChromeVox.isStickyPrefOn = this.originalStickyState_;
850 } 862 }
851 }, false); 863 }, false);
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/accessibility/spoken_feedback_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698