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

Side by Side Diff: ui/file_manager/gallery/js/gallery.js

Issue 2299493002: Add an ability for resize in gallery. (Closed)
Patch Set: Created 4 years, 3 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
OLDNEW
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 ContentMetadataProvider.WORKER_SCRIPT = '/js/metadata_worker.js'; 9 ContentMetadataProvider.WORKER_SCRIPT = '/js/metadata_worker.js';
10 10
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after
769 // Handle mode specific shortcut keys. 769 // Handle mode specific shortcut keys.
770 if (this.currentMode_.onKeyDown(event)) { 770 if (this.currentMode_.onKeyDown(event)) {
771 event.preventDefault(); 771 event.preventDefault();
772 return; 772 return;
773 } 773 }
774 774
775 // Handle application wide shortcut keys. 775 // Handle application wide shortcut keys.
776 switch (keyString) { 776 switch (keyString) {
777 case 'Backspace': 777 case 'Backspace':
778 // The default handler would call history.back and close the Gallery. 778 // The default handler would call history.back and close the Gallery.
779 // Except while typing into text.
780 if(!event.target.classList.contains('text'))
779 event.preventDefault(); 781 event.preventDefault();
fukino 2016/08/31 05:10:24 indent is needed
harukam 2016/09/05 10:37:00 Done.
780 break; 782 break;
781 783
782 case 'm': // 'm' switches between Slide and Mosaic mode. 784 case 'm': // 'm' switches between Slide and Mosaic mode.
783 if (!this.modeSwitchButton_.disabled) 785 if (!this.modeSwitchButton_.disabled)
784 this.toggleMode_(undefined, event); 786 this.toggleMode_(undefined, event);
785 break; 787 break;
786 788
787 case 'v': 789 case 'v':
788 case 'MediaPlayPause': 790 case 'MediaPlayPause':
789 if (!this.slideshowButton_.disabled) { 791 if (!this.slideshowButton_.disabled) {
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
1060 */ 1062 */
1061 var initializePromise = 1063 var initializePromise =
1062 Promise.all([loadTimeDataPromise, volumeManagerPromise]). 1064 Promise.all([loadTimeDataPromise, volumeManagerPromise]).
1063 then(function(args) { 1065 then(function(args) {
1064 var volumeManager = args[1]; 1066 var volumeManager = args[1];
1065 gallery = new Gallery(volumeManager); 1067 gallery = new Gallery(volumeManager);
1066 }); 1068 });
1067 1069
1068 // Loads entries. 1070 // Loads entries.
1069 initializePromise.then(reload); 1071 initializePromise.then(reload);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698