Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Side by Side Diff: chrome/browser/resources/file_manager/foreground/js/photo/gallery.js

Issue 133233002: Recover gallery after crash in Files app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/resources/file_manager/foreground/js/file_manager.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 632
633 /** 633 /**
634 * Updates the UI related to the selected item and the persistent state. 634 * Updates the UI related to the selected item and the persistent state.
635 * 635 *
636 * @private 636 * @private
637 */ 637 */
638 Gallery.prototype.updateSelectionAndState_ = function() { 638 Gallery.prototype.updateSelectionAndState_ = function() {
639 var path; 639 var path;
640 var displayName = ''; 640 var displayName = '';
641 641
642 // TODO(mtomasz): Migrate fullPath to toURL().
642 var selectedItems = this.getSelectedItems(); 643 var selectedItems = this.getSelectedItems();
643 if (selectedItems.length === 1) { 644 if (selectedItems.length === 1) {
644 var item = selectedItems[0]; 645 var item = selectedItems[0];
645 var entry = item.getEntry(); 646 var entry = item.getEntry();
647 path = entry.fullPath;
646 window.top.document.title = entry.name; 648 window.top.document.title = entry.name;
647 displayName = ImageUtil.getDisplayNameFromName(entry.name); 649 displayName = ImageUtil.getDisplayNameFromName(entry.name);
648 } else if (selectedItems.length > 1 && this.context_.curDirEntry) { 650 } else if (selectedItems.length > 1 && this.context_.curDirEntry) {
649 // If the Gallery was opened on search results the search query will not be 651 // If the Gallery was opened on search results the search query will not be
650 // recorded in the app state and the relaunch will just open the gallery 652 // recorded in the app state and the relaunch will just open the gallery
651 // in the curDirEntry directory. 653 // in the curDirEntry directory.
652 path = this.context_.curDirEntry.fullPath; 654 path = this.context_.curDirEntry.fullPath;
653 window.top.document.title = this.context_.curDirEntry.name; 655 window.top.document.title = this.context_.curDirEntry.name;
654 displayName = 656 displayName =
655 this.displayStringFunction_('GALLERY_ITEMS_SELECTED', 657 this.displayStringFunction_('GALLERY_ITEMS_SELECTED',
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 */ 865 */
864 Gallery.prototype.updateButtons_ = function() { 866 Gallery.prototype.updateButtons_ = function() {
865 if (this.modeButton_) { 867 if (this.modeButton_) {
866 var oppositeMode = 868 var oppositeMode =
867 this.currentMode_ === this.slideMode_ ? this.mosaicMode_ : 869 this.currentMode_ === this.slideMode_ ? this.mosaicMode_ :
868 this.slideMode_; 870 this.slideMode_;
869 this.modeButton_.title = 871 this.modeButton_.title =
870 this.displayStringFunction_(oppositeMode.getTitle()); 872 this.displayStringFunction_(oppositeMode.getTitle());
871 } 873 }
872 }; 874 };
OLDNEW
« no previous file with comments | « chrome/browser/resources/file_manager/foreground/js/file_manager.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698