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

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

Issue 2557073003: Call preventDefault in all on-tap events that show a dialog. (Closed)
Patch Set: nit Created 4 years 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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 id = display.id; 363 id = display.id;
364 break; 364 break;
365 } 365 }
366 } 366 }
367 properties.mirroringSourceId = this.primaryDisplayId; 367 properties.mirroringSourceId = this.primaryDisplayId;
368 } 368 }
369 settings.display.systemDisplayApi.setDisplayProperties( 369 settings.display.systemDisplayApi.setDisplayProperties(
370 id, properties, this.setPropertiesCallback_.bind(this)); 370 id, properties, this.setPropertiesCallback_.bind(this));
371 }, 371 },
372 372
373 /** @private */ 373 /**
374 onOverscanTap_: function() { 374 * @param {!Event} e
375 * @private
376 */
377 onOverscanTap_: function(e) {
378 e.preventDefault();
375 this.overscanDisplayId = this.selectedDisplay.id; 379 this.overscanDisplayId = this.selectedDisplay.id;
376 this.showOverscanDialog_(true); 380 this.showOverscanDialog_(true);
377 }, 381 },
378 382
379 /** @private */ 383 /** @private */
380 updateDisplayInfo_() { 384 updateDisplayInfo_() {
381 var displayIds = ''; 385 var displayIds = '';
382 var primaryDisplay = undefined; 386 var primaryDisplay = undefined;
383 var selectedDisplay = undefined; 387 var selectedDisplay = undefined;
384 for (var display of this.displays) { 388 for (var display of this.displays) {
(...skipping 13 matching lines...) Expand all
398 }, 402 },
399 403
400 /** @private */ 404 /** @private */
401 setPropertiesCallback_: function() { 405 setPropertiesCallback_: function() {
402 if (chrome.runtime.lastError) { 406 if (chrome.runtime.lastError) {
403 console.error( 407 console.error(
404 'setDisplayProperties Error: ' + chrome.runtime.lastError.message); 408 'setDisplayProperties Error: ' + chrome.runtime.lastError.message);
405 } 409 }
406 }, 410 },
407 }); 411 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698