| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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('settings'); | 5 cr.exportPath('settings'); |
| 6 assert(!settings.defaultResourceLoaded, | 6 assert(!settings.defaultResourceLoaded, |
| 7 'settings.js run twice. You probably have an invalid import.'); | 7 'settings.js run twice. You probably have an invalid import.'); |
| 8 /** Global defined when the main Settings script runs. */ | 8 /** Global defined when the main Settings script runs. */ |
| 9 settings.defaultResourceLoaded = true; | 9 settings.defaultResourceLoaded = true; |
| 10 | 10 |
| 11 /** | 11 /** |
| 12 * @fileoverview | 12 * @fileoverview |
| 13 * 'cr-settings' is the main MD-Settings element, combining the UI and models. | 13 * 'cr-settings' is the main MD-Settings element, combining the UI and models. |
| 14 * | 14 * |
| 15 * Example: | 15 * Example: |
| 16 * | 16 * |
| 17 * <cr-settings></cr-settings> | 17 * <cr-settings></cr-settings> |
| 18 */ | 18 */ |
| 19 Polymer({ | 19 Polymer({ |
| 20 is: 'cr-settings', | 20 is: 'cr-settings', |
| 21 | 21 |
| 22 /** @override */ |
| 23 created: function() { |
| 24 settings.initializeRouteFromUrl(); |
| 25 }, |
| 26 |
| 27 /** @override */ |
| 22 ready: function() { | 28 ready: function() { |
| 23 this.$.ui.directionDelegate = new settings.DirectionDelegateImpl; | 29 this.$.ui.directionDelegate = new settings.DirectionDelegateImpl; |
| 24 }, | 30 }, |
| 25 }); | 31 }); |
| OLD | NEW |