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

Side by Side Diff: chrome/browser/resources/options/chromeos/display_options.js

Issue 227593011: Modifies the threshold for hidpi displays. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
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 var OptionsPage = options.OptionsPage; 6 var OptionsPage = options.OptionsPage;
7 7
8 // The scale ratio of the display rectangle to its original size. 8 // The scale ratio of the display rectangle to its original size.
9 /** @const */ var VISUAL_SCALE = 1 / 10; 9 /** @const */ var VISUAL_SCALE = 1 / 10;
10 10
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 if (display.resolutions.length <= 1) { 615 if (display.resolutions.length <= 1) {
616 var option = document.createElement('option'); 616 var option = document.createElement('option');
617 option.value = 'default'; 617 option.value = 'default';
618 option.textContent = display.width + 'x' + display.height; 618 option.textContent = display.width + 'x' + display.height;
619 option.selected = true; 619 option.selected = true;
620 resolution.appendChild(option); 620 resolution.appendChild(option);
621 resolution.disabled = true; 621 resolution.disabled = true;
622 } else { 622 } else {
623 for (var i = 0; i < display.resolutions.length; i++) { 623 for (var i = 0; i < display.resolutions.length; i++) {
624 var option = document.createElement('option'); 624 var option = document.createElement('option');
625 var width = display.resolutions[i].width;
626 var height = display.resolutions[i].height;
627 var scaleFactor = display.resolutions[i].scaleFactor;
628 if (display.resolutions[i].scaleFactor) {
629 width /= scaleFactor;
630 height /= scaleFactor;
631 }
625 option.value = i; 632 option.value = i;
626 option.textContent = display.resolutions[i].width + 'x' + 633 option.textContent = width + 'x' + height;
627 display.resolutions[i].height;
628 if (display.resolutions[i].isBest) { 634 if (display.resolutions[i].isBest) {
629 option.textContent += ' ' + 635 option.textContent += ' ' +
630 loadTimeData.getString('annotateBest'); 636 loadTimeData.getString('annotateBest');
631 } 637 }
632 option.selected = display.resolutions[i].selected; 638 option.selected = display.resolutions[i].selected;
633 resolution.appendChild(option); 639 resolution.appendChild(option);
634 } 640 }
635 resolution.disabled = (display.resolutions.length <= 1); 641 resolution.disabled = (display.resolutions.length <= 1);
636 } 642 }
637 643
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 mirroring, displays, layout, offset) { 883 mirroring, displays, layout, offset) {
878 DisplayOptions.getInstance().onDisplayChanged_( 884 DisplayOptions.getInstance().onDisplayChanged_(
879 mirroring, displays, layout, offset); 885 mirroring, displays, layout, offset);
880 }; 886 };
881 887
882 // Export 888 // Export
883 return { 889 return {
884 DisplayOptions: DisplayOptions 890 DisplayOptions: DisplayOptions
885 }; 891 };
886 }); 892 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698