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

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

Issue 2142303002: Revert of 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 { 50 {
51 return WebInspector.Revealer.revealPromise(WebInspector.console); 51 return WebInspector.Revealer.revealPromise(WebInspector.console);
52 }, 52 },
53 53
54 _loaded: function() 54 _loaded: function()
55 { 55 {
56 console.timeStamp("Main._loaded"); 56 console.timeStamp("Main._loaded");
57 57
58 if (InspectorFrontendHost.isUnderTest()) 58 if (InspectorFrontendHost.isUnderTest())
59 self.runtime.useTestBase(); 59 self.runtime.useTestBase();
60 Runtime.setPlatform(WebInspector.platform());
61 InspectorFrontendHost.getPreferences(this._gotPreferences.bind(this)); 60 InspectorFrontendHost.getPreferences(this._gotPreferences.bind(this));
62 }, 61 },
63 62
64 /** 63 /**
65 * @param {!Object<string, string>} prefs 64 * @param {!Object<string, string>} prefs
66 */ 65 */
67 _gotPreferences: function(prefs) 66 _gotPreferences: function(prefs)
68 { 67 {
69 console.timeStamp("Main._gotPreferences"); 68 console.timeStamp("Main._gotPreferences");
70 this._createSettings(prefs); 69 this._createSettings(prefs);
(...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 * @param {string} side 876 * @param {string} side
878 */ 877 */
879 function setDockSide(side) 878 function setDockSide(side)
880 { 879 {
881 WebInspector.dockController.setDockSide(side); 880 WebInspector.dockController.setDockSide(side);
882 contextMenu.discard(); 881 contextMenu.discard();
883 } 882 }
884 883
885 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"));
886 contextMenu.appendItemsAtLocation("mainMenu"); 885 contextMenu.appendItemsAtLocation("mainMenu");
887 var moreTools = contextMenu.namedSubMenu("mainMenuMoreTools");
888 var extensions = self.runtime.extensions("drawer-view", undefined, true) ;
889 for (var extension of extensions) {
890 var descriptor = extension.descriptor();
891 moreTools.appendItem(extension.title(), WebInspector.inspectorView.s howViewInDrawer.bind(WebInspector.inspectorView, descriptor["name"]));
892 }
893
894 contextMenu.show(); 886 contextMenu.show();
895 } 887 }
896 } 888 }
897 889
898 /** 890 /**
899 * @constructor 891 * @constructor
900 */ 892 */
901 WebInspector.NetworkPanelIndicator = function() 893 WebInspector.NetworkPanelIndicator = function()
902 { 894 {
903 // TODO: we should not access network from other modules. 895 // TODO: we should not access network from other modules.
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
1125 * @return {?Element} 1117 * @return {?Element}
1126 */ 1118 */
1127 settingElement: function() 1119 settingElement: function()
1128 { 1120 {
1129 return WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIStri ng("Show rulers"), WebInspector.moduleSetting("showMetricsRulers")); 1121 return WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIStri ng("Show rulers"), WebInspector.moduleSetting("showMetricsRulers"));
1130 } 1122 }
1131 } 1123 }
1132 1124
1133 1125
1134 new WebInspector.Main(); 1126 new WebInspector.Main();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698