OLD | NEW |
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 Page = cr.ui.pageManager.Page; | 6 var Page = cr.ui.pageManager.Page; |
7 var PageManager = cr.ui.pageManager.PageManager; | 7 var PageManager = cr.ui.pageManager.PageManager; |
8 | 8 |
9 // The scale ratio of the display rectangle to its original size. | 9 // The scale ratio of the display rectangle to its original size. |
10 /** @const */ var VISUAL_SCALE = 1 / 10; | 10 /** @const */ var VISUAL_SCALE = 1 / 10; |
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
610 } else { | 610 } else { |
611 var previousOption; | 611 var previousOption; |
612 for (var i = 0; i < display.resolutions.length; i++) { | 612 for (var i = 0; i < display.resolutions.length; i++) { |
613 var option = document.createElement('option'); | 613 var option = document.createElement('option'); |
614 option.value = i; | 614 option.value = i; |
615 option.textContent = display.resolutions[i].width + 'x' + | 615 option.textContent = display.resolutions[i].width + 'x' + |
616 display.resolutions[i].height; | 616 display.resolutions[i].height; |
617 if (display.resolutions[i].isBest) { | 617 if (display.resolutions[i].isBest) { |
618 option.textContent += ' ' + | 618 option.textContent += ' ' + |
619 loadTimeData.getString('annotateBest'); | 619 loadTimeData.getString('annotateBest'); |
| 620 } else if (display.resolutions[i].isNative) { |
| 621 option.textContent += ' ' + |
| 622 loadTimeData.getString('annotateNative'); |
620 } | 623 } |
621 if (display.resolutions[i].deviceScaleFactor && previousOption && | 624 if (display.resolutions[i].deviceScaleFactor && previousOption && |
622 previousOption.textContent == option.textContent) { | 625 previousOption.textContent == option.textContent) { |
623 option.textContent += | 626 option.textContent += |
624 ' (' + display.resolutions[i].deviceScaleFactor + 'x)'; | 627 ' (' + display.resolutions[i].deviceScaleFactor + 'x)'; |
625 } | 628 } |
626 option.selected = display.resolutions[i].selected; | 629 option.selected = display.resolutions[i].selected; |
627 resolution.appendChild(option); | 630 resolution.appendChild(option); |
628 previousOption = option; | 631 previousOption = option; |
629 } | 632 } |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
872 mirroring, displays, layout, offset) { | 875 mirroring, displays, layout, offset) { |
873 DisplayOptions.getInstance().onDisplayChanged_( | 876 DisplayOptions.getInstance().onDisplayChanged_( |
874 mirroring, displays, layout, offset); | 877 mirroring, displays, layout, offset); |
875 }; | 878 }; |
876 | 879 |
877 // Export | 880 // Export |
878 return { | 881 return { |
879 DisplayOptions: DisplayOptions | 882 DisplayOptions: DisplayOptions |
880 }; | 883 }; |
881 }); | 884 }); |
OLD | NEW |