| 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 /** | 5 /** |
| 6 * Contains the possible types of Change Picture selections. | 6 * Contains the possible types of Change Picture selections. |
| 7 * @enum {string} | 7 * @enum {string} |
| 8 */ | 8 */ |
| 9 var ChangePictureSelectionTypes = { | 9 var ChangePictureSelectionTypes = { |
| 10 CAMERA: 'camera', | 10 CAMERA: 'camera', |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 'old-image-changed', this.receiveOldImage_.bind(this)); | 130 'old-image-changed', this.receiveOldImage_.bind(this)); |
| 131 this.addWebUIListener( | 131 this.addWebUIListener( |
| 132 'profile-image-changed', this.receiveProfileImage_.bind(this)); | 132 'profile-image-changed', this.receiveProfileImage_.bind(this)); |
| 133 this.addWebUIListener( | 133 this.addWebUIListener( |
| 134 'camera-presence-changed', this.receiveCameraPresence_.bind(this)); | 134 'camera-presence-changed', this.receiveCameraPresence_.bind(this)); |
| 135 }, | 135 }, |
| 136 | 136 |
| 137 | 137 |
| 138 /** @protected */ | 138 /** @protected */ |
| 139 currentRouteChanged: function(newRoute) { | 139 currentRouteChanged: function(newRoute) { |
| 140 if (newRoute == settings.Route.CHANGE_PICTURE) { | 140 if (newRoute == settings.routes.CHANGE_PICTURE) { |
| 141 this.browserProxy_.initialize(); | 141 this.browserProxy_.initialize(); |
| 142 | 142 |
| 143 // This in needed because we manually clear the selectedItem_ property | 143 // This in needed because we manually clear the selectedItem_ property |
| 144 // when navigating away. The selector element doesn't fire its upward | 144 // when navigating away. The selector element doesn't fire its upward |
| 145 // data binding unless its selected item has changed. | 145 // data binding unless its selected item has changed. |
| 146 this.selectedItem_ = this.$.selector.selectedItem; | 146 this.selectedItem_ = this.$.selector.selectedItem; |
| 147 // Focus the container by default so that the arrow keys work (and since | 147 // Focus the container by default so that the arrow keys work (and since |
| 148 // we use the focus highlight to show which picture is selected). | 148 // we use the focus highlight to show which picture is selected). |
| 149 this.$.container.focus(); | 149 this.$.container.focus(); |
| 150 } else { | 150 } else { |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 getAuthorWebsite_: function(selectedItem, defaultImages) { | 465 getAuthorWebsite_: function(selectedItem, defaultImages) { |
| 466 if (!this.isAuthorCreditShown_(selectedItem)) | 466 if (!this.isAuthorCreditShown_(selectedItem)) |
| 467 return ''; | 467 return ''; |
| 468 | 468 |
| 469 assert( | 469 assert( |
| 470 selectedItem.dataset.defaultImageIndex !== null && | 470 selectedItem.dataset.defaultImageIndex !== null && |
| 471 selectedItem.dataset.defaultImageIndex < defaultImages.length); | 471 selectedItem.dataset.defaultImageIndex < defaultImages.length); |
| 472 return defaultImages[selectedItem.dataset.defaultImageIndex].website; | 472 return defaultImages[selectedItem.dataset.defaultImageIndex].website; |
| 473 }, | 473 }, |
| 474 }); | 474 }); |
| OLD | NEW |