| 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 util.addPageLoadHandler(function() { | 5 util.addPageLoadHandler(function() { |
| 6 if (!location.hash) | 6 if (!location.hash) |
| 7 return; | 7 return; |
| 8 | 8 |
| 9 var pageState; | 9 var pageState; |
| 10 if (location.search) { | 10 if (location.search) { |
| (...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 848 | 848 |
| 849 /** | 849 /** |
| 850 * Update available actions list based on the currently selected urls. | 850 * Update available actions list based on the currently selected urls. |
| 851 * @private. | 851 * @private. |
| 852 */ | 852 */ |
| 853 Gallery.prototype.updateShareMenu_ = function() { | 853 Gallery.prototype.updateShareMenu_ = function() { |
| 854 var urls = this.getSelectedUrls(); | 854 var urls = this.getSelectedUrls(); |
| 855 | 855 |
| 856 var internalId = util.platform.getAppId(); | 856 var internalId = util.platform.getAppId(); |
| 857 function isShareAction(task) { | 857 function isShareAction(task) { |
| 858 var task_parts = task.taskId.split('|'); | 858 var taskParts = task.taskId.split('|'); |
| 859 return task_parts[0] != internalId; | 859 return taskParts[0] != internalId; |
| 860 } | 860 } |
| 861 | 861 |
| 862 var api = Gallery.getFileBrowserPrivate(); | 862 var api = Gallery.getFileBrowserPrivate(); |
| 863 var mimeTypes = []; // TODO(kaznacheev) Collect mime types properly. | 863 var mimeTypes = []; // TODO(kaznacheev) Collect mime types properly. |
| 864 api.getFileTasks(urls, mimeTypes, function(tasks) { | 864 api.getFileTasks(urls, mimeTypes, function(tasks) { |
| 865 var wasHidden = this.shareMenu_.hidden; | 865 var wasHidden = this.shareMenu_.hidden; |
| 866 this.shareMenu_.hidden = true; | 866 this.shareMenu_.hidden = true; |
| 867 var items = this.shareMenu_.querySelectorAll('.item'); | 867 var items = this.shareMenu_.querySelectorAll('.item'); |
| 868 for (var i = 0; i != items.length; i++) { | 868 for (var i = 0; i != items.length; i++) { |
| 869 items[i].parentNode.removeChild(items[i]); | 869 items[i].parentNode.removeChild(items[i]); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 895 Gallery.prototype.updateThumbnails_ = function() { | 895 Gallery.prototype.updateThumbnails_ = function() { |
| 896 if (this.currentMode_ == this.slideMode_) | 896 if (this.currentMode_ == this.slideMode_) |
| 897 this.slideMode_.updateThumbnails(); | 897 this.slideMode_.updateThumbnails(); |
| 898 | 898 |
| 899 if (this.mosaicMode_) { | 899 if (this.mosaicMode_) { |
| 900 var mosaic = this.mosaicMode_.getMosaic(); | 900 var mosaic = this.mosaicMode_.getMosaic(); |
| 901 if (mosaic.isInitialized()) | 901 if (mosaic.isInitialized()) |
| 902 mosaic.reload(); | 902 mosaic.reload(); |
| 903 } | 903 } |
| 904 }; | 904 }; |
| OLD | NEW |