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

Unified Diff: ui/file_manager/file_manager/foreground/js/file_manager_commands.js

Issue 299443009: Add keyboard shortcuts in Files.app to open inspector. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use commands for shortcuts and run update_extension_functions.py. 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 side-by-side diff with in-line comments
Download patch
Index: ui/file_manager/file_manager/foreground/js/file_manager_commands.js
diff --git a/ui/file_manager/file_manager/foreground/js/file_manager_commands.js b/ui/file_manager/file_manager/foreground/js/file_manager_commands.js
index 6040974762f9181b74f2edbbc1c1597eaf022ecc..6b6bea9b342f3096de53adecabe998bd8103a1ca 100644
--- a/ui/file_manager/file_manager/foreground/js/file_manager_commands.js
+++ b/ui/file_manager/file_manager/foreground/js/file_manager_commands.js
@@ -905,3 +905,48 @@ CommandHandler.COMMANDS_['zoom-reset'] = {
},
canExecute: CommandUtil.canExecuteAlways
};
+
+/**
+ * Open inspector for foreground page.
+ * @type {Command}
+ */
+CommandHandler.COMMANDS_['inspect-normal'] = {
+ execute: function(event, fileManager) {
+ chrome.fileBrowserPrivate.openInspector('normal');
+ },
+ canExecute: CommandUtil.canExecuteAlways
+};
+
+/**
+ * Open inspector for foreground page and focus to console tab.
+ * @type {Command}
+ */
+CommandHandler.COMMANDS_['inspect-console'] = {
+ execute: function(event, fileManager) {
+ chrome.fileBrowserPrivate.openInspector('console');
+ },
+ canExecute: CommandUtil.canExecuteAlways
+};
+
+/**
+ * Open inspector for foreground page and start element inspection.
+ * @type {Command}
+ */
+CommandHandler.COMMANDS_['inspect-element'] = {
+ execute: function(event, fileManager) {
+ chrome.fileBrowserPrivate.openInspector('element');
+ },
+ canExecute: CommandUtil.canExecuteAlways
+};
+
+/**
+ * Open inspector for background page.
+ * @type {Command}
+ */
+CommandHandler.COMMANDS_['inspect-background'] = {
+ execute: function(event, fileManager) {
+ chrome.fileBrowserPrivate.openInspector('background');
+ },
+ canExecute: CommandUtil.canExecuteAlways
+};
+

Powered by Google App Engine
This is Rietveld 408576698