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

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

Issue 299443009: Add keyboard shortcuts in Files.app to open inspector. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and edit comments. Created 6 years, 7 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
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 * FileManager constructor. 8 * FileManager constructor.
9 * 9 *
10 * FileManager objects encapsulate the functionality of the file selector 10 * FileManager objects encapsulate the functionality of the file selector
(...skipping 2927 matching lines...) Expand 10 before | Expand all | Expand 10 after
2938 event.preventDefault(); 2938 event.preventDefault();
2939 return; 2939 return;
2940 2940
2941 case '27': // Escape => Cancel dialog. 2941 case '27': // Escape => Cancel dialog.
2942 if (this.dialogType != DialogType.FULL_PAGE) { 2942 if (this.dialogType != DialogType.FULL_PAGE) {
2943 // If there is nothing else for ESC to do, then cancel the dialog. 2943 // If there is nothing else for ESC to do, then cancel the dialog.
2944 event.preventDefault(); 2944 event.preventDefault();
2945 this.cancelButton_.click(); 2945 this.cancelButton_.click();
2946 } 2946 }
2947 break; 2947 break;
2948
2949 case 'Ctrl-Shift-73': // Ctrl + Shift + I
hirono 2014/05/23 04:50:08 Please use command which is a common way to add ac
fukino 2014/05/23 06:16:28 Done.
2950 // Open inspector for foreground page.
2951 chrome.fileBrowserPrivate.openInspector('');
2952 break;
2953
2954 case 'Ctrl-Shift-74': // Ctrl + Shift + J
2955 // Open inspector for foreground page and focus to console tab.
2956 chrome.fileBrowserPrivate.openInspector('console');
2957 break;
2958
2959 case 'Ctrl-Shift-67': // Ctrl + Shift + C
2960 // Open inspector for foreground page and focus to element tab.
2961 chrome.fileBrowserPrivate.openInspector('element');
2962 break;
2963
2964 case 'Ctrl-Shift-66': // Ctrl + Shift + B
2965 // Open inspector for background page.
2966 chrome.fileBrowserPrivate.openInspector('background');
2967 break;
2948 } 2968 }
2949 }; 2969 };
2950 2970
2951 /** 2971 /**
2952 * KeyUp event handler for the document. 2972 * KeyUp event handler for the document.
2953 * @param {Event} event Key event. 2973 * @param {Event} event Key event.
2954 * @private 2974 * @private
2955 */ 2975 */
2956 FileManager.prototype.onKeyUp_ = function(event) { 2976 FileManager.prototype.onKeyUp_ = function(event) {
2957 if (event.keyCode === 9) // Tab 2977 if (event.keyCode === 9) // Tab
(...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after
3775 callback(this.preferences_); 3795 callback(this.preferences_);
3776 return; 3796 return;
3777 } 3797 }
3778 3798
3779 chrome.fileBrowserPrivate.getPreferences(function(prefs) { 3799 chrome.fileBrowserPrivate.getPreferences(function(prefs) {
3780 this.preferences_ = prefs; 3800 this.preferences_ = prefs;
3781 callback(prefs); 3801 callback(prefs);
3782 }.bind(this)); 3802 }.bind(this));
3783 }; 3803 };
3784 })(); 3804 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698