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

Side by Side Diff: chrome/browser/resources/settings/device_page/display.js

Issue 2817803002: MD Settings: CrOS: Focus elements on dialog close (Closed)
Patch Set: rebase Created 3 years, 8 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 6 * @fileoverview
7 * 'settings-display' is the settings subpage for display settings. 7 * 'settings-display' is the settings subpage for display settings.
8 */ 8 */
9 9
10 cr.define('settings.display', function() { 10 cr.define('settings.display', function() {
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 * @param {!Event} e 478 * @param {!Event} e
479 * @private 479 * @private
480 */ 480 */
481 onOverscanTap_: function(e) { 481 onOverscanTap_: function(e) {
482 e.preventDefault(); 482 e.preventDefault();
483 this.overscanDisplayId = this.selectedDisplay.id; 483 this.overscanDisplayId = this.selectedDisplay.id;
484 this.showOverscanDialog_(true); 484 this.showOverscanDialog_(true);
485 }, 485 },
486 486
487 /** @private */ 487 /** @private */
488 onCloseOverscanDialog_: function() {
489 this.$$('#overscan button').focus();
490 },
491
492 /** @private */
488 updateDisplayInfo_: function() { 493 updateDisplayInfo_: function() {
489 var displayIds = ''; 494 var displayIds = '';
490 var primaryDisplay = undefined; 495 var primaryDisplay = undefined;
491 var selectedDisplay = undefined; 496 var selectedDisplay = undefined;
492 for (var i = 0; i < this.displays.length; ++i) { 497 for (var i = 0; i < this.displays.length; ++i) {
493 var display = this.displays[i]; 498 var display = this.displays[i];
494 if (displayIds) 499 if (displayIds)
495 displayIds += ','; 500 displayIds += ',';
496 displayIds += display.id; 501 displayIds += display.id;
497 if (display.isPrimary && !primaryDisplay) 502 if (display.isPrimary && !primaryDisplay)
(...skipping 13 matching lines...) Expand all
511 }, 516 },
512 517
513 /** @private */ 518 /** @private */
514 setPropertiesCallback_: function() { 519 setPropertiesCallback_: function() {
515 if (chrome.runtime.lastError) { 520 if (chrome.runtime.lastError) {
516 console.error( 521 console.error(
517 'setDisplayProperties Error: ' + chrome.runtime.lastError.message); 522 'setDisplayProperties Error: ' + chrome.runtime.lastError.message);
518 } 523 }
519 }, 524 },
520 }); 525 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/device_page/display.html ('k') | chrome/browser/resources/settings/device_page/storage.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698