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

Side by Side Diff: Source/devtools/front_end/components/InspectorView.js

Issue 1169323004: DevTools: do not respect Chrome theme in DevTools, align toolbar items. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: overflow for tab header fixed. Created 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // DevTools sidebar is a vertical split of panels tabbed pane and a drawer. 42 // DevTools sidebar is a vertical split of panels tabbed pane and a drawer.
43 this._drawerSplitWidget = new WebInspector.SplitWidget(false, true, "Inspect or.drawerSplitViewState", 200, 200); 43 this._drawerSplitWidget = new WebInspector.SplitWidget(false, true, "Inspect or.drawerSplitViewState", 200, 200);
44 this._drawerSplitWidget.hideSidebar(); 44 this._drawerSplitWidget.hideSidebar();
45 this._drawerSplitWidget.enableShowModeSaving(); 45 this._drawerSplitWidget.enableShowModeSaving();
46 this._drawerSplitWidget.show(this.element); 46 this._drawerSplitWidget.show(this.element);
47 47
48 this._tabbedPane = new WebInspector.TabbedPane(); 48 this._tabbedPane = new WebInspector.TabbedPane();
49 this._tabbedPane.registerRequiredCSS("components/inspectorViewTabbedPane.css "); 49 this._tabbedPane.registerRequiredCSS("components/inspectorViewTabbedPane.css ");
50 this._tabbedPane.element.classList.add("inspector-view-tabbed-pane"); 50 this._tabbedPane.element.classList.add("inspector-view-tabbed-pane");
51 this._tabbedPane.setRetainTabOrder(true); 51 this._tabbedPane.setRetainTabOrder(true);
52 if (Runtime.experiments.isEnabled("materialDesign")) 52 this._tabbedPane.setTabSlider(true);
53 this._tabbedPane.setTabSlider(true);
54 this._drawerSplitWidget.setMainWidget(this._tabbedPane); 53 this._drawerSplitWidget.setMainWidget(this._tabbedPane);
55 this._drawer = new WebInspector.Drawer(this._drawerSplitWidget); 54 this._drawer = new WebInspector.Drawer(this._drawerSplitWidget);
56 55
57 this._panels = {}; 56 this._panels = {};
58 // Used by tests. 57 // Used by tests.
59 WebInspector["panels"] = this._panels; 58 WebInspector["panels"] = this._panels;
60 59
61 this._history = []; 60 this._history = [];
62 this._historyIterator = -1; 61 this._historyIterator = -1;
63 this._keyDownBound = this._keyDown.bind(this); 62 this._keyDownBound = this._keyDown.bind(this);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 this.addPanel(new WebInspector.RuntimeExtensionPanelDescriptor(exten sion)); 111 this.addPanel(new WebInspector.RuntimeExtensionPanelDescriptor(exten sion));
113 } 112 }
114 WebInspector.endBatchUpdate(); 113 WebInspector.endBatchUpdate();
115 }, 114 },
116 115
117 createToolbars: function() 116 createToolbars: function()
118 { 117 {
119 this._leftToolbar = new WebInspector.ExtensibleToolbar("main-toolbar-lef t"); 118 this._leftToolbar = new WebInspector.ExtensibleToolbar("main-toolbar-lef t");
120 this._leftToolbar.element.classList.add("inspector-view-toolbar", "inspe ctor-view-toolbar-left"); 119 this._leftToolbar.element.classList.add("inspector-view-toolbar", "inspe ctor-view-toolbar-left");
121 120
122 if (!Runtime.experiments.isEnabled("materialDesign"))
123 this._leftToolbar.makeNarrow();
124 this._tabbedPane.insertBeforeTabStrip(this._leftToolbar.element); 121 this._tabbedPane.insertBeforeTabStrip(this._leftToolbar.element);
125 122
126 var rightToolbarContainer = createElementWithClass("div", "hbox flex-non e flex-centered"); 123 var rightToolbarContainer = createElementWithClass("div", "hbox flex-non e flex-centered");
127 this._tabbedPane.appendAfterTabStrip(rightToolbarContainer); 124 this._tabbedPane.appendAfterTabStrip(rightToolbarContainer);
128 125
129 this._rightToolbar = new WebInspector.ExtensibleToolbar("main-toolbar-ri ght"); 126 this._rightToolbar = new WebInspector.ExtensibleToolbar("main-toolbar-ri ght");
130 this._rightToolbar.element.classList.add("inspector-view-toolbar", "flex -none"); 127 this._rightToolbar.element.classList.add("inspector-view-toolbar", "flex -none");
131 rightToolbarContainer.appendChild(this._rightToolbar.element); 128 rightToolbarContainer.appendChild(this._rightToolbar.element);
132
133 var closeButtonElement = rightToolbarContainer.createChild("div", "inspe ctor-view-close-button flex-none", "dt-close-button");
134 closeButtonElement.addEventListener("click", InspectorFrontendHost.close Window.bind(InspectorFrontendHost), true);
135 }, 129 },
136 130
137 /** 131 /**
138 * @param {!WebInspector.PanelDescriptor} panelDescriptor 132 * @param {!WebInspector.PanelDescriptor} panelDescriptor
139 */ 133 */
140 addPanel: function(panelDescriptor) 134 addPanel: function(panelDescriptor)
141 { 135 {
142 var panelName = panelDescriptor.name(); 136 var panelName = panelDescriptor.name();
143 this._panelDescriptors[panelName] = panelDescriptor; 137 this._panelDescriptors[panelName] = panelDescriptor;
144 this._tabbedPane.appendTab(panelName, panelDescriptor.title(), new WebIn spector.Widget()); 138 this._tabbedPane.appendTab(panelName, panelDescriptor.title(), new WebIn spector.Widget());
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 WebInspector.InspectorView.ToggleDrawerButtonProvider.prototype = { 537 WebInspector.InspectorView.ToggleDrawerButtonProvider.prototype = {
544 /** 538 /**
545 * @override 539 * @override
546 * @return {?WebInspector.ToolbarItem} 540 * @return {?WebInspector.ToolbarItem}
547 */ 541 */
548 item: function() 542 item: function()
549 { 543 {
550 return WebInspector.inspectorView._drawer.toggleButton(); 544 return WebInspector.inspectorView._drawer.toggleButton();
551 } 545 }
552 } 546 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698