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

Side by Side Diff: chrome/browser/resources/options/options_page.js

Issue 192573003: After a supervised user has been imported, close overlays. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Simplify. Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/resources/options/managed_user_import.js ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 cr.define('options', function() { 5 cr.define('options', function() {
6 /** @const */ var FocusOutlineManager = cr.ui.FocusOutlineManager; 6 /** @const */ var FocusOutlineManager = cr.ui.FocusOutlineManager;
7 7
8 ///////////////////////////////////////////////////////////////////////////// 8 /////////////////////////////////////////////////////////////////////////////
9 // OptionsPage class: 9 // OptionsPage class:
10 10
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 340
341 overlay.visible = false; 341 overlay.visible = false;
342 342
343 if (overlay.didClosePage) overlay.didClosePage(); 343 if (overlay.didClosePage) overlay.didClosePage();
344 this.updateHistoryState_(false, {ignoreHash: true}); 344 this.updateHistoryState_(false, {ignoreHash: true});
345 345
346 this.restoreLastFocusedElement_(); 346 this.restoreLastFocusedElement_();
347 }; 347 };
348 348
349 /** 349 /**
350 * Closes all overlays and updates the history after each closed overlay.
351 */
352 OptionsPage.closeAllOverlays = function() {
353 while (this.isOverlayVisible_()) {
354 this.closeOverlay();
355 }
356 };
357
358 /**
350 * Cancels (closes) the overlay, due to the user pressing <Esc>. 359 * Cancels (closes) the overlay, due to the user pressing <Esc>.
351 */ 360 */
352 OptionsPage.cancelOverlay = function() { 361 OptionsPage.cancelOverlay = function() {
353 // Blur the active element to ensure any changed pref value is saved. 362 // Blur the active element to ensure any changed pref value is saved.
354 document.activeElement.blur(); 363 document.activeElement.blur();
355 var overlay = this.getVisibleOverlay_(); 364 var overlay = this.getVisibleOverlay_();
356 // Let the overlay handle the <Esc> if it wants to. 365 // Let the overlay handle the <Esc> if it wants to.
357 if (overlay.handleCancel) { 366 if (overlay.handleCancel) {
358 overlay.handleCancel(); 367 overlay.handleCancel();
359 this.restoreLastFocusedElement_(); 368 this.restoreLastFocusedElement_();
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
1002 canShowPage: function() { 1011 canShowPage: function() {
1003 return true; 1012 return true;
1004 }, 1013 },
1005 }; 1014 };
1006 1015
1007 // Export 1016 // Export
1008 return { 1017 return {
1009 OptionsPage: OptionsPage 1018 OptionsPage: OptionsPage
1010 }; 1019 };
1011 }); 1020 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/managed_user_import.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698