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

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

Issue 1402353013: Update the current mirroring mode correctly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.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 1002 matching lines...) Expand 10 before | Expand all | Expand 10 after
1013 this.mirroring_ = mirroring; 1013 this.mirroring_ = mirroring;
1014 this.unifiedDesktopEnabled_ = unifiedDesktopEnabled; 1014 this.unifiedDesktopEnabled_ = unifiedDesktopEnabled;
1015 this.displays_ = displays; 1015 this.displays_ = displays;
1016 1016
1017 this.resetDisplaysView_(); 1017 this.resetDisplaysView_();
1018 if (this.mirroring_) 1018 if (this.mirroring_)
1019 this.layoutMirroringDisplays_(); 1019 this.layoutMirroringDisplays_();
1020 else 1020 else
1021 this.layoutDisplays_(); 1021 this.layoutDisplays_();
1022 1022
1023 $('display-options-select-mirroring').value =
1024 mirroring ? 'mirroring' : 'extended';
1025
1023 $('display-options-unified-desktop').hidden = 1026 $('display-options-unified-desktop').hidden =
1024 !this.showUnifiedDesktopOption_; 1027 !this.showUnifiedDesktopOption_;
1025 1028
1026 $('display-options-toggle-unified-desktop').checked = 1029 $('display-options-toggle-unified-desktop').checked =
1027 this.unifiedDesktopEnabled_; 1030 this.unifiedDesktopEnabled_;
1028 1031
1029 var disableUnifiedDesktopOption = 1032 var disableUnifiedDesktopOption =
1030 (this.mirroring_ || 1033 (this.mirroring_ ||
1031 (!this.unifiedDesktopEnabled_ && 1034 (!this.unifiedDesktopEnabled_ &&
1032 this.displays_.length == 1)); 1035 this.displays_.length == 1));
1033 1036
1034 $('display-options-toggle-unified-desktop').disabled = 1037 $('display-options-toggle-unified-desktop').disabled =
1035 disableUnifiedDesktopOption; 1038 disableUnifiedDesktopOption;
1036 1039
1037 this.updateSelectedDisplayDescription_(); 1040 this.updateSelectedDisplayDescription_();
1038 } 1041 }
1039 }; 1042 };
1040 1043
1041 DisplayOptions.setDisplayInfo = function( 1044 DisplayOptions.setDisplayInfo = function(
1042 mode, displays, layout, offset) { 1045 mode, displays, layout, offset) {
1043 DisplayOptions.getInstance().onDisplayChanged_( 1046 DisplayOptions.getInstance().onDisplayChanged_(
1044 mode, displays, layout, offset); 1047 mode, displays, layout, offset);
1045 }; 1048 };
1046 1049
1047 // Export 1050 // Export
1048 return { 1051 return {
1049 DisplayOptions: DisplayOptions 1052 DisplayOptions: DisplayOptions
1050 }; 1053 };
1051 }); 1054 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698