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

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

Issue 2498903002: Revert of Show the tutorial during OOBE (Closed)
Patch Set: 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 });
154 }; 142 };
155 143
156 /** 144 /**
157 * Update the display based on prefs. 145 * Update the display based on prefs.
158 */ 146 */
159 Panel.updateFromPrefs = function() { 147 Panel.updateFromPrefs = function() {
160 if (Panel.searching_) { 148 if (Panel.searching_) {
161 this.speechContainer_.hidden = true; 149 this.speechContainer_.hidden = true;
162 this.brailleContainer_.hidden = true; 150 this.brailleContainer_.hidden = true;
163 this.searchContainer_.hidden = false; 151 this.searchContainer_.hidden = false;
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after
854 }, false); 842 }, false);
855 843
856 window.addEventListener('hashchange', function() { 844 window.addEventListener('hashchange', function() {
857 if (location.hash == '#fullscreen' || location.hash == '#focus') { 845 if (location.hash == '#fullscreen' || location.hash == '#focus') {
858 this.originalStickyState_ = cvox.ChromeVox.isStickyPrefOn; 846 this.originalStickyState_ = cvox.ChromeVox.isStickyPrefOn;
859 cvox.ChromeVox.isStickyPrefOn = false; 847 cvox.ChromeVox.isStickyPrefOn = false;
860 } else { 848 } else {
861 cvox.ChromeVox.isStickyPrefOn = this.originalStickyState_; 849 cvox.ChromeVox.isStickyPrefOn = this.originalStickyState_;
862 } 850 }
863 }, false); 851 }, 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