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

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: . 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 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 * @param {!Event} e 427 * @param {!Event} e
428 * @private 428 * @private
429 */ 429 */
430 onOverscanTap_: function(e) { 430 onOverscanTap_: function(e) {
431 e.preventDefault(); 431 e.preventDefault();
432 this.overscanDisplayId = this.selectedDisplay.id; 432 this.overscanDisplayId = this.selectedDisplay.id;
433 this.showOverscanDialog_(true); 433 this.showOverscanDialog_(true);
434 }, 434 },
435 435
436 /** @private */ 436 /** @private */
437 onCloseOverscanDialog_: function() {
438 this.$$('#overscan button').focus();
439 },
440
441 /** @private */
437 updateDisplayInfo_: function() { 442 updateDisplayInfo_: function() {
438 var displayIds = ''; 443 var displayIds = '';
439 var primaryDisplay = undefined; 444 var primaryDisplay = undefined;
440 var selectedDisplay = undefined; 445 var selectedDisplay = undefined;
441 for (var i = 0; i < this.displays.length; ++i) { 446 for (var i = 0; i < this.displays.length; ++i) {
442 var display = this.displays[i]; 447 var display = this.displays[i];
443 if (displayIds) 448 if (displayIds)
444 displayIds += ','; 449 displayIds += ',';
445 displayIds += display.id; 450 displayIds += display.id;
446 if (display.isPrimary && !primaryDisplay) 451 if (display.isPrimary && !primaryDisplay)
(...skipping 11 matching lines...) Expand all
458 }, 463 },
459 464
460 /** @private */ 465 /** @private */
461 setPropertiesCallback_: function() { 466 setPropertiesCallback_: function() {
462 if (chrome.runtime.lastError) { 467 if (chrome.runtime.lastError) {
463 console.error( 468 console.error(
464 'setDisplayProperties Error: ' + chrome.runtime.lastError.message); 469 'setDisplayProperties Error: ' + chrome.runtime.lastError.message);
465 } 470 }
466 }, 471 },
467 }); 472 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698