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

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

Issue 329113002: DevTools: Restore toolbar button order regressed in r175358 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/devtools/front_end/main/module.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 configuration.push("layers"); 59 configuration.push("layers");
60 if (WebInspector.experimentsSettings.devicesPanel.isEnabled()) 60 if (WebInspector.experimentsSettings.devicesPanel.isEnabled())
61 configuration.push("devices"); 61 configuration.push("devices");
62 } 62 }
63 WebInspector.moduleManager.registerModules(configuration); 63 WebInspector.moduleManager.registerModules(configuration);
64 }, 64 },
65 65
66 _createGlobalStatusBarItems: function() 66 _createGlobalStatusBarItems: function()
67 { 67 {
68 var extensions = WebInspector.moduleManager.extensions(WebInspector.Stat usBarButton.Provider); 68 var extensions = WebInspector.moduleManager.extensions(WebInspector.Stat usBarButton.Provider);
69
70 /**
71 * @param {!WebInspector.ModuleManager.Extension} left
72 * @param {!WebInspector.ModuleManager.Extension} right
73 */
74 function orderComparator(left, right)
75 {
76 return left.descriptor()["order"] - right.descriptor()["order"];
77 }
78 extensions.sort(orderComparator);
69 extensions.forEach(function(extension) { 79 extensions.forEach(function(extension) {
70 var button; 80 var button;
71 switch (extension.descriptor()["location"]) { 81 switch (extension.descriptor()["location"]) {
72 case "toolbar-left": 82 case "toolbar-left":
73 button = createButton(extension); 83 button = createButton(extension);
74 if (button) 84 if (button)
75 WebInspector.inspectorView.appendToLeftToolbar(button.elemen t); 85 WebInspector.inspectorView.appendToLeftToolbar(button.elemen t);
76 break; 86 break;
77 case "toolbar-right": 87 case "toolbar-right":
78 button = createButton(extension); 88 button = createButton(extension);
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 818
809 WebInspector.__defineGetter__("inspectedPageURL", function() 819 WebInspector.__defineGetter__("inspectedPageURL", function()
810 { 820 {
811 return WebInspector.resourceTreeModel.inspectedPageURL(); 821 return WebInspector.resourceTreeModel.inspectedPageURL();
812 }); 822 });
813 823
814 WebInspector.panel = function(name) 824 WebInspector.panel = function(name)
815 { 825 {
816 return WebInspector.inspectorView.panel(name); 826 return WebInspector.inspectorView.panel(name);
817 } 827 }
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/front_end/main/module.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698