| OLD | NEW |
| 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 cr.exportPath('options'); | 5 cr.exportPath('options'); |
| 6 | 6 |
| 7 cr.define('options', function() { | 7 cr.define('options', function() { |
| 8 'use strict'; | 8 'use strict'; |
| 9 | 9 |
| 10 /** | 10 /** |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 */ | 92 */ |
| 93 addDisplayLayout: function(displayLayout) { | 93 addDisplayLayout: function(displayLayout) { |
| 94 this.displayLayoutMap_[displayLayout.id] = displayLayout; | 94 this.displayLayoutMap_[displayLayout.id] = displayLayout; |
| 95 }, | 95 }, |
| 96 | 96 |
| 97 /** | 97 /** |
| 98 * Returns the display layout for |id|. | 98 * Returns the display layout for |id|. |
| 99 * @param {string} id | 99 * @param {string} id |
| 100 * @return {options.DisplayLayout} | 100 * @return {options.DisplayLayout} |
| 101 */ | 101 */ |
| 102 getDisplayLayout: function(id) { return this.displayLayoutMap_[id]; }, | 102 getDisplayLayout: function(id) { |
| 103 return this.displayLayoutMap_[id]; |
| 104 }, |
| 103 | 105 |
| 104 /** | 106 /** |
| 105 * Returns the number of display layout entries. | 107 * Returns the number of display layout entries. |
| 106 * @return {number} | 108 * @return {number} |
| 107 */ | 109 */ |
| 108 getDisplayLayoutCount: function() { | 110 getDisplayLayoutCount: function() { |
| 109 return Object.keys(/** @type {!Object} */ (this.displayLayoutMap_)) | 111 return Object.keys(/** @type {!Object} */ (this.displayLayoutMap_)) |
| 110 .length; | 112 .length; |
| 111 }, | 113 }, |
| 112 | 114 |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 return child; | 379 return child; |
| 378 } | 380 } |
| 379 assertNotReached(); | 381 assertNotReached(); |
| 380 return null; | 382 return null; |
| 381 } | 383 } |
| 382 }; | 384 }; |
| 383 | 385 |
| 384 // Export | 386 // Export |
| 385 return {DisplayLayoutManager: DisplayLayoutManager}; | 387 return {DisplayLayoutManager: DisplayLayoutManager}; |
| 386 }); | 388 }); |
| OLD | NEW |