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.exportPath('options'); | 5 cr.exportPath('options'); |
6 | 6 |
7 /** | 7 /** |
8 * @typedef {{ | 8 * @typedef {{ |
9 * availableColorProfiles: Array.<{profileId: number, name: string}>, | 9 * availableColorProfiles: Array.<{profileId: number, name: string}>, |
10 * colorProfile: number, | 10 * colorProfile: number, |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 }).bind(this); | 203 }).bind(this); |
204 $('selected-display-start-calibrating-overscan').onclick = (function() { | 204 $('selected-display-start-calibrating-overscan').onclick = (function() { |
205 // Passes the target display ID. Do not specify it through URL hash, | 205 // Passes the target display ID. Do not specify it through URL hash, |
206 // we do not care back/forward. | 206 // we do not care back/forward. |
207 var displayOverscan = options.DisplayOverscan.getInstance(); | 207 var displayOverscan = options.DisplayOverscan.getInstance(); |
208 displayOverscan.setDisplayId(this.displays_[this.focusedIndex_].id); | 208 displayOverscan.setDisplayId(this.displays_[this.focusedIndex_].id); |
209 PageManager.showPageByName('displayOverscan'); | 209 PageManager.showPageByName('displayOverscan'); |
210 chrome.send('coreOptionsUserMetricsAction', | 210 chrome.send('coreOptionsUserMetricsAction', |
211 ['Options_DisplaySetOverscan']); | 211 ['Options_DisplaySetOverscan']); |
212 }).bind(this); | 212 }).bind(this); |
213 | |
214 chrome.send('getDisplayInfo'); | |
215 }, | 213 }, |
216 | 214 |
217 /** @override */ | 215 /** @override */ |
218 didShowPage: function() { | 216 didShowPage: function() { |
219 var optionTitles = document.getElementsByClassName( | 217 var optionTitles = document.getElementsByClassName( |
220 'selected-display-option-title'); | 218 'selected-display-option-title'); |
221 var maxSize = 0; | 219 var maxSize = 0; |
222 for (var i = 0; i < optionTitles.length; i++) | 220 for (var i = 0; i < optionTitles.length; i++) |
223 maxSize = Math.max(maxSize, optionTitles[i].clientWidth); | 221 maxSize = Math.max(maxSize, optionTitles[i].clientWidth); |
224 for (var i = 0; i < optionTitles.length; i++) | 222 for (var i = 0; i < optionTitles.length; i++) |
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
911 mirroring, displays, layout, offset) { | 909 mirroring, displays, layout, offset) { |
912 DisplayOptions.getInstance().onDisplayChanged_( | 910 DisplayOptions.getInstance().onDisplayChanged_( |
913 mirroring, displays, layout, offset); | 911 mirroring, displays, layout, offset); |
914 }; | 912 }; |
915 | 913 |
916 // Export | 914 // Export |
917 return { | 915 return { |
918 DisplayOptions: DisplayOptions | 916 DisplayOptions: DisplayOptions |
919 }; | 917 }; |
920 }); | 918 }); |
OLD | NEW |