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

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

Issue 2137763002: DevTools: automatically populate 'More tools' submenu with the drawer views. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 865 matching lines...) Expand 10 before | Expand all | Expand 10 after
876 * @param {string} side 876 * @param {string} side
877 */ 877 */
878 function setDockSide(side) 878 function setDockSide(side)
879 { 879 {
880 WebInspector.dockController.setDockSide(side); 880 WebInspector.dockController.setDockSide(side);
881 contextMenu.discard(); 881 contextMenu.discard();
882 } 882 }
883 883
884 contextMenu.appendAction("main.toggle-drawer", WebInspector.inspectorVie w.drawerVisible() ? WebInspector.UIString("Hide console") : WebInspector.UIStrin g("Show console")); 884 contextMenu.appendAction("main.toggle-drawer", WebInspector.inspectorVie w.drawerVisible() ? WebInspector.UIString("Hide console") : WebInspector.UIStrin g("Show console"));
885 contextMenu.appendItemsAtLocation("mainMenu"); 885 contextMenu.appendItemsAtLocation("mainMenu");
886 var moreTools = contextMenu.namedSubMenu("mainMenuMoreTools");
887 var extensions = self.runtime.extensions("drawer-view", undefined, true) ;
888 for (var extension of extensions) {
889 var descriptor = extension.descriptor();
890 moreTools.appendItem(extension.title(WebInspector.platform()), WebIn spector.inspectorView.showViewInDrawer.bind(WebInspector.inspectorView, descript or["name"]));
891 }
892
886 contextMenu.show(); 893 contextMenu.show();
887 } 894 }
888 } 895 }
889 896
890 /** 897 /**
891 * @constructor 898 * @constructor
892 */ 899 */
893 WebInspector.NetworkPanelIndicator = function() 900 WebInspector.NetworkPanelIndicator = function()
894 { 901 {
895 // TODO: we should not access network from other modules. 902 // TODO: we should not access network from other modules.
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 * @return {?Element} 1124 * @return {?Element}
1118 */ 1125 */
1119 settingElement: function() 1126 settingElement: function()
1120 { 1127 {
1121 return WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIStri ng("Show rulers"), WebInspector.moduleSetting("showMetricsRulers")); 1128 return WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIStri ng("Show rulers"), WebInspector.moduleSetting("showMetricsRulers"));
1122 } 1129 }
1123 } 1130 }
1124 1131
1125 1132
1126 new WebInspector.Main(); 1133 new WebInspector.Main();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698