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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sources/SourcesView.js

Issue 2485573009: DevTools: Move the Run Snippet button into the status bar. (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 /** 4 /**
5 * @implements {WebInspector.TabbedEditorContainerDelegate} 5 * @implements {WebInspector.TabbedEditorContainerDelegate}
6 * @implements {WebInspector.Searchable} 6 * @implements {WebInspector.Searchable}
7 * @implements {WebInspector.Replaceable} 7 * @implements {WebInspector.Replaceable}
8 * @unrestricted 8 * @unrestricted
9 */ 9 */
10 WebInspector.SourcesView = class extends WebInspector.VBox { 10 WebInspector.SourcesView = class extends WebInspector.VBox {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 self.runtime.allInstances(WebInspector.SourcesView.EditorAction).then(append ButtonsForExtensions.bind(this)); 44 self.runtime.allInstances(WebInspector.SourcesView.EditorAction).then(append ButtonsForExtensions.bind(this));
45 /** 45 /**
46 * @param {!Array.<!WebInspector.SourcesView.EditorAction>} actions 46 * @param {!Array.<!WebInspector.SourcesView.EditorAction>} actions
47 * @this {WebInspector.SourcesView} 47 * @this {WebInspector.SourcesView}
48 */ 48 */
49 function appendButtonsForExtensions(actions) { 49 function appendButtonsForExtensions(actions) {
50 for (var i = 0; i < actions.length; ++i) 50 for (var i = 0; i < actions.length; ++i)
51 this._toolbarEditorActions.appendToolbarItem(actions[i].button(this)); 51 this._toolbarEditorActions.appendToolbarItem(actions[i].button(this));
52 } 52 }
53 this._scriptViewToolbar = new WebInspector.Toolbar('', this._toolbarContaine rElement); 53 this._scriptViewToolbar = new WebInspector.Toolbar('', this._toolbarContaine rElement);
54 this._toolbarContainerElement.createChild('div', 'sources-toolbar-spacer'); 54 this._scriptViewToolbar.element.style.flex = 'auto';
55 this._bottomToolbar = new WebInspector.Toolbar('', this._toolbarContainerEle ment); 55 this._bottomToolbar = new WebInspector.Toolbar('', this._toolbarContainerEle ment);
56 56
57 WebInspector.startBatchUpdate(); 57 WebInspector.startBatchUpdate();
58 workspace.uiSourceCodes().forEach(this._addUISourceCode.bind(this)); 58 workspace.uiSourceCodes().forEach(this._addUISourceCode.bind(this));
59 WebInspector.endBatchUpdate(); 59 WebInspector.endBatchUpdate();
60 60
61 workspace.addEventListener(WebInspector.Workspace.Events.UISourceCodeAdded, this._uiSourceCodeAdded, this); 61 workspace.addEventListener(WebInspector.Workspace.Events.UISourceCodeAdded, this._uiSourceCodeAdded, this);
62 workspace.addEventListener(WebInspector.Workspace.Events.UISourceCodeRemoved , this._uiSourceCodeRemoved, this); 62 workspace.addEventListener(WebInspector.Workspace.Events.UISourceCodeRemoved , this._uiSourceCodeRemoved, this);
63 workspace.addEventListener(WebInspector.Workspace.Events.ProjectRemoved, thi s._projectRemoved.bind(this), this); 63 workspace.addEventListener(WebInspector.Workspace.Events.ProjectRemoved, thi s._projectRemoved.bind(this), this);
64 64
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 * @return {boolean} 765 * @return {boolean}
766 */ 766 */
767 handleAction(context, actionId) { 767 handleAction(context, actionId) {
768 var sourcesView = WebInspector.context.flavor(WebInspector.SourcesView); 768 var sourcesView = WebInspector.context.flavor(WebInspector.SourcesView);
769 if (!sourcesView) 769 if (!sourcesView)
770 return false; 770 return false;
771 sourcesView._editorContainer.closeAllFiles(); 771 sourcesView._editorContainer.closeAllFiles();
772 return true; 772 return true;
773 } 773 }
774 }; 774 };
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698