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 'use strict'; | 5 'use strict'; |
6 | 6 |
7 /** | 7 /** |
8 * Called from the main frame when unloading. | 8 * Called from the main frame when unloading. |
9 * @return {string?} User-visible message on null if it is OK to close. | 9 * @return {string?} User-visible message on null if it is OK to close. |
10 */ | 10 */ |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 this.container_, this.displayStringFunction_); | 212 this.container_, this.displayStringFunction_); |
213 | 213 |
214 this.modeButton_ = util.createChild(this.toolbar_, 'button mode', 'button'); | 214 this.modeButton_ = util.createChild(this.toolbar_, 'button mode', 'button'); |
215 this.modeButton_.addEventListener('click', | 215 this.modeButton_.addEventListener('click', |
216 this.toggleMode_.bind(this, null)); | 216 this.toggleMode_.bind(this, null)); |
217 | 217 |
218 this.mosaicMode_ = new MosaicMode(content, | 218 this.mosaicMode_ = new MosaicMode(content, |
219 this.dataModel_, | 219 this.dataModel_, |
220 this.selectionModel_, | 220 this.selectionModel_, |
221 this.metadataCache_, | 221 this.metadataCache_, |
| 222 this.volumeManager_, |
222 this.toggleMode_.bind(this, null)); | 223 this.toggleMode_.bind(this, null)); |
223 | 224 |
224 this.slideMode_ = new SlideMode(this.container_, | 225 this.slideMode_ = new SlideMode(this.container_, |
225 content, | 226 content, |
226 this.toolbar_, | 227 this.toolbar_, |
227 this.prompt_, | 228 this.prompt_, |
228 this.dataModel_, | 229 this.dataModel_, |
229 this.selectionModel_, | 230 this.selectionModel_, |
230 this.context_, | 231 this.context_, |
231 this.toggleMode_.bind(this), | 232 this.toggleMode_.bind(this), |
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
863 */ | 864 */ |
864 Gallery.prototype.updateButtons_ = function() { | 865 Gallery.prototype.updateButtons_ = function() { |
865 if (this.modeButton_) { | 866 if (this.modeButton_) { |
866 var oppositeMode = | 867 var oppositeMode = |
867 this.currentMode_ === this.slideMode_ ? this.mosaicMode_ : | 868 this.currentMode_ === this.slideMode_ ? this.mosaicMode_ : |
868 this.slideMode_; | 869 this.slideMode_; |
869 this.modeButton_.title = | 870 this.modeButton_.title = |
870 this.displayStringFunction_(oppositeMode.getTitle()); | 871 this.displayStringFunction_(oppositeMode.getTitle()); |
871 } | 872 } |
872 }; | 873 }; |
OLD | NEW |