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

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: 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 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 } 719 }
720 720
721 /** 721 /**
722 * @param {string} side 722 * @param {string} side
723 */ 723 */
724 function setDockSide(side) { 724 function setDockSide(side) {
725 Components.dockController.setDockSide(side); 725 Components.dockController.setDockSide(side);
726 contextMenu.discard(); 726 contextMenu.discard();
727 } 727 }
728 728
729 contextMenu.appendAction('commandMenu.show', 'Run command');
729 contextMenu.appendAction( 730 contextMenu.appendAction(
730 'main.toggle-drawer', UI.inspectorView.drawerVisible() ? Common.UIString ('Hide console drawer') : 731 'main.toggle-drawer', UI.inspectorView.drawerVisible() ? Common.UIString ('Hide console drawer') :
731 Common.UIString ('Show console drawer')); 732 Common.UIString ('Show console drawer'));
732 contextMenu.appendItemsAtLocation('mainMenu'); 733 contextMenu.appendItemsAtLocation('mainMenu');
733 var moreTools = contextMenu.namedSubMenu('mainMenuMoreTools'); 734 var moreTools = contextMenu.namedSubMenu('mainMenuMoreTools');
734 var extensions = self.runtime.extensions('view', undefined, true); 735 var extensions = self.runtime.extensions('view', undefined, true);
735 for (var extension of extensions) { 736 for (var extension of extensions) {
736 var descriptor = extension.descriptor(); 737 var descriptor = extension.descriptor();
737 if (descriptor['persistence'] !== 'closeable') 738 if (descriptor['persistence'] !== 'closeable')
738 continue; 739 continue;
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
976 * @override 977 * @override
977 * @return {?Element} 978 * @return {?Element}
978 */ 979 */
979 settingElement() { 980 settingElement() {
980 return UI.SettingsUI.createSettingCheckbox( 981 return UI.SettingsUI.createSettingCheckbox(
981 Common.UIString('Show rulers'), Common.moduleSetting('showMetricsRulers' )); 982 Common.UIString('Show rulers'), Common.moduleSetting('showMetricsRulers' ));
982 } 983 }
983 }; 984 };
984 985
985 new Main.Main(); 986 new Main.Main();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698