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

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

Issue 2427833002: Use md-select instead of paper-dropdown-menu-light in display.html (Closed)
Patch Set: Fix test Created 4 years, 2 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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 assert(newIndex < this.selectedDisplay.modes.length); 272 assert(newIndex < this.selectedDisplay.modes.length);
273 /** @type {!chrome.system.display.DisplayProperties} */ var properties = { 273 /** @type {!chrome.system.display.DisplayProperties} */ var properties = {
274 displayMode: this.selectedDisplay.modes[newIndex] 274 displayMode: this.selectedDisplay.modes[newIndex]
275 }; 275 };
276 settings.display.systemDisplayApi.setDisplayProperties( 276 settings.display.systemDisplayApi.setDisplayProperties(
277 this.selectedDisplay.id, properties, 277 this.selectedDisplay.id, properties,
278 this.setPropertiesCallback_.bind(this)); 278 this.setPropertiesCallback_.bind(this));
279 }, 279 },
280 280
281 /** 281 /**
282 * @param {!{detail: !{selected: string}}} e 282 * @param {!Event} event
283 * @private 283 * @private
284 */ 284 */
285 onSetOrientation_: function(e) { 285 onOrientationChange_: function(event) {
286 let target = /** @type {!HTMLSelectElement} */ (event.target);
286 /** @type {!chrome.system.display.DisplayProperties} */ var properties = { 287 /** @type {!chrome.system.display.DisplayProperties} */ var properties = {
287 rotation: parseInt(e.detail.selected, 10) 288 rotation: parseInt(target.value, 10)
288 }; 289 };
289 settings.display.systemDisplayApi.setDisplayProperties( 290 settings.display.systemDisplayApi.setDisplayProperties(
290 this.selectedDisplay.id, properties, 291 this.selectedDisplay.id, properties,
291 this.setPropertiesCallback_.bind(this)); 292 this.setPropertiesCallback_.bind(this));
292 }, 293 },
293 294
294 /** @private */ 295 /** @private */
295 onMirroredTap_: function() { 296 onMirroredTap_: function() {
296 var id = ''; 297 var id = '';
297 /** @type {!chrome.system.display.DisplayProperties} */ var properties = {}; 298 /** @type {!chrome.system.display.DisplayProperties} */ var properties = {};
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 }, 341 },
341 342
342 /** @private */ 343 /** @private */
343 setPropertiesCallback_: function() { 344 setPropertiesCallback_: function() {
344 if (chrome.runtime.lastError) { 345 if (chrome.runtime.lastError) {
345 console.error( 346 console.error(
346 'setDisplayProperties Error: ' + chrome.runtime.lastError.message); 347 'setDisplayProperties Error: ' + chrome.runtime.lastError.message);
347 } 348 }
348 }, 349 },
349 }); 350 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/device_page/display.html ('k') | chrome/test/data/webui/settings/device_page_tests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698