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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/main/Main.js

Issue 2716683006: DevTools: add entry points for command menu (Closed)
Patch Set: no wrap/scroll Created 3 years, 9 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 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). 3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com).
4 * Copyright (C) 2009 Joseph Pecoraro 4 * Copyright (C) 2009 Joseph Pecoraro
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 } 724 }
725 725
726 /** 726 /**
727 * @param {string} side 727 * @param {string} side
728 */ 728 */
729 function setDockSide(side) { 729 function setDockSide(side) {
730 Components.dockController.setDockSide(side); 730 Components.dockController.setDockSide(side);
731 contextMenu.discard(); 731 contextMenu.discard();
732 } 732 }
733 733
734 contextMenu.appendAction('commandMenu.show', 'Run command');
chenwilliam 2017/03/09 22:30:16 Common.UIString
pfeldman 2017/03/28 00:59:34 You should not indirectly refer to the action ids
luoe 2017/04/22 00:07:03 Done.
734 contextMenu.appendAction( 735 contextMenu.appendAction(
735 'main.toggle-drawer', UI.inspectorView.drawerVisible() ? Common.UIString ('Hide console drawer') : 736 'main.toggle-drawer', UI.inspectorView.drawerVisible() ? Common.UIString ('Hide console drawer') :
736 Common.UIString ('Show console drawer')); 737 Common.UIString ('Show console drawer'));
737 contextMenu.appendItemsAtLocation('mainMenu'); 738 contextMenu.appendItemsAtLocation('mainMenu');
738 var moreTools = contextMenu.namedSubMenu('mainMenuMoreTools'); 739 var moreTools = contextMenu.namedSubMenu('mainMenuMoreTools');
739 var extensions = self.runtime.extensions('view', undefined, true); 740 var extensions = self.runtime.extensions('view', undefined, true);
740 for (var extension of extensions) { 741 for (var extension of extensions) {
741 var descriptor = extension.descriptor(); 742 var descriptor = extension.descriptor();
742 if (descriptor['persistence'] !== 'closeable') 743 if (descriptor['persistence'] !== 'closeable')
743 continue; 744 continue;
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
985 * @override 986 * @override
986 * @return {?Element} 987 * @return {?Element}
987 */ 988 */
988 settingElement() { 989 settingElement() {
989 return UI.SettingsUI.createSettingCheckbox( 990 return UI.SettingsUI.createSettingCheckbox(
990 Common.UIString('Show rulers'), Common.moduleSetting('showMetricsRulers' )); 991 Common.UIString('Show rulers'), Common.moduleSetting('showMetricsRulers' ));
991 } 992 }
992 }; 993 };
993 994
994 new Main.Main(); 995 new Main.Main();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698