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

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

Issue 2640673002: (WIP) Use generator to generate externs for chrome.fileManagerPrivate API.
Patch Set: Compile passes Created 3 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
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 740 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 * 751 *
752 * @param {!Event} event 752 * @param {!Event} event
753 * @private 753 * @private
754 */ 754 */
755 Gallery.prototype.onKeyDown_ = function(event) { 755 Gallery.prototype.onKeyDown_ = function(event) {
756 var keyString = util.getKeyModifiers(event) + event.key; 756 var keyString = util.getKeyModifiers(event) + event.key;
757 757
758 // Handle debug shortcut keys. 758 // Handle debug shortcut keys.
759 switch (keyString) { 759 switch (keyString) {
760 case 'Ctrl-Shift-I': // Ctrl+Shift+I 760 case 'Ctrl-Shift-I': // Ctrl+Shift+I
761 chrome.fileManagerPrivate.openInspector('normal'); 761 chrome.fileManagerPrivate.openInspector(
762 chrome.fileManagerPrivate.InspectionType.NORMAL);
762 break; 763 break;
763 case 'Ctrl-Shift-J': // Ctrl+Shift+J 764 case 'Ctrl-Shift-J': // Ctrl+Shift+J
764 chrome.fileManagerPrivate.openInspector('console'); 765 chrome.fileManagerPrivate.openInspector(
766 chrome.fileManagerPrivate.InspectionType.CONSOLE);
765 break; 767 break;
766 case 'Ctrl-Shift-C': // Ctrl+Shift+C 768 case 'Ctrl-Shift-C': // Ctrl+Shift+C
767 chrome.fileManagerPrivate.openInspector('element'); 769 chrome.fileManagerPrivate.openInspector(
770 chrome.fileManagerPrivate.InspectionType.ELEMENT);
768 break; 771 break;
769 case 'Ctrl-Shift-B': // Ctrl+Shift+B 772 case 'Ctrl-Shift-B': // Ctrl+Shift+B
770 chrome.fileManagerPrivate.openInspector('background'); 773 chrome.fileManagerPrivate.openInspector(
774 chrome.fileManagerPrivate.InspectionType.BACKGROUND);
771 break; 775 break;
772 } 776 }
773 777
774 // Do not capture keys when share dialog is shown. 778 // Do not capture keys when share dialog is shown.
775 if (this.shareDialog_.isShowing()) 779 if (this.shareDialog_.isShowing())
776 return; 780 return;
777 781
778 // Show UIs when user types any key. 782 // Show UIs when user types any key.
779 this.dimmableUIController_.kick(); 783 this.dimmableUIController_.kick();
780 784
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
1074 */ 1078 */
1075 var initializePromise = 1079 var initializePromise =
1076 Promise.all([loadTimeDataPromise, volumeManagerPromise]). 1080 Promise.all([loadTimeDataPromise, volumeManagerPromise]).
1077 then(function(args) { 1081 then(function(args) {
1078 var volumeManager = args[1]; 1082 var volumeManager = args[1];
1079 gallery = new Gallery(volumeManager); 1083 gallery = new Gallery(volumeManager);
1080 }); 1084 });
1081 1085
1082 // Loads entries. 1086 // Loads entries.
1083 initializePromise.then(reload); 1087 initializePromise.then(reload);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698