OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 * Overrided metadata worker's path. | 6 * Overrided metadata worker's path. |
7 * @type {string} | 7 * @type {string} |
8 */ | 8 */ |
9 ContentProvider.WORKER_SCRIPT = '/js/metadata_worker.js'; | 9 ContentProvider.WORKER_SCRIPT = '/js/metadata_worker.js'; |
10 | 10 |
(...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
872 Gallery.prototype.updateButtons_ = function() { | 872 Gallery.prototype.updateButtons_ = function() { |
873 if (this.modeButton_) { | 873 if (this.modeButton_) { |
874 var oppositeMode = | 874 var oppositeMode = |
875 this.currentMode_ === this.slideMode_ ? this.mosaicMode_ : | 875 this.currentMode_ === this.slideMode_ ? this.mosaicMode_ : |
876 this.slideMode_; | 876 this.slideMode_; |
877 this.modeButton_.title = str(oppositeMode.getTitle()); | 877 this.modeButton_.title = str(oppositeMode.getTitle()); |
878 } | 878 } |
879 }; | 879 }; |
880 | 880 |
881 /** | 881 /** |
882 * Enters the debug mode. | |
883 */ | |
884 Gallery.prototype.debugMe = function() { | |
885 this.mosaicMode_.debugMe(); | |
886 }; | |
887 | |
888 /** | |
882 * Singleton gallery. | 889 * Singleton gallery. |
883 * @type {Gallery} | 890 * @type {Gallery} |
884 */ | 891 */ |
885 var gallery = null; | 892 var gallery = null; |
886 | 893 |
887 /** | 894 /** |
888 * Initialize the window. | 895 * Initialize the window. |
889 * @param {!BackgroundComponents} backgroundComponents Background components. | 896 * @param {!BackgroundComponents} backgroundComponents Background components. |
890 */ | 897 */ |
891 window.initialize = function(backgroundComponents) { | 898 window.initialize = function(backgroundComponents) { |
892 window.loadTimeData.data = backgroundComponents.stringData; | 899 window.loadTimeData.data = backgroundComponents.stringData; |
893 gallery = new Gallery(backgroundComponents.volumeManager); | 900 gallery = new Gallery(backgroundComponents.volumeManager); |
894 }; | 901 }; |
895 | 902 |
896 /** | 903 /** |
897 * Loads entries. | 904 * Loads entries. |
898 * @param {!Array.<Entry>} entries Array of entries. | 905 * @param {!Array.<Entry>} entries Array of entries. |
899 * @param {!Array.<Entry>} selectedEntries Array of selected entries. | 906 * @param {!Array.<Entry>} selectedEntries Array of selected entries. |
900 */ | 907 */ |
901 window.loadEntries = function(entries, selectedEntries) { | 908 window.loadEntries = function(entries, selectedEntries) { |
902 gallery.load(entries, selectedEntries); | 909 gallery.load(entries, selectedEntries); |
903 }; | 910 }; |
911 | |
912 /** | |
913 * Entres the debug mode. | |
fukino
2015/01/09 11:29:03
typo: Entres
hirono
2015/01/13 03:13:13
Done.
| |
914 */ | |
915 window.debugMe = function() { | |
916 gallery.debugMe(); | |
917 }; | |
OLD | NEW |