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

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

Issue 2401353004: Merge to 2883 "[DevTools] Support top/bottom show sidebar button." (Closed)
Patch Set: Created 4 years, 2 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 // 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 /** 5 /**
6 * @constructor 6 * @constructor
7 * @implements {WebInspector.TabbedEditorContainerDelegate} 7 * @implements {WebInspector.TabbedEditorContainerDelegate}
8 * @implements {WebInspector.Searchable} 8 * @implements {WebInspector.Searchable}
9 * @implements {WebInspector.Replaceable} 9 * @implements {WebInspector.Replaceable}
10 * @extends {WebInspector.VBox} 10 * @extends {WebInspector.VBox}
(...skipping 30 matching lines...) Expand all
41 /** 41 /**
42 * @param {!Array.<!WebInspector.SourcesView.EditorAction>} actions 42 * @param {!Array.<!WebInspector.SourcesView.EditorAction>} actions
43 * @this {WebInspector.SourcesView} 43 * @this {WebInspector.SourcesView}
44 */ 44 */
45 function appendButtonsForExtensions(actions) 45 function appendButtonsForExtensions(actions)
46 { 46 {
47 for (var i = 0; i < actions.length; ++i) 47 for (var i = 0; i < actions.length; ++i)
48 this._toolbarEditorActions.appendToolbarItem(actions[i].button(this) ); 48 this._toolbarEditorActions.appendToolbarItem(actions[i].button(this) );
49 } 49 }
50 this._scriptViewToolbar = new WebInspector.Toolbar("", this._toolbarContaine rElement); 50 this._scriptViewToolbar = new WebInspector.Toolbar("", this._toolbarContaine rElement);
51 this._toolbarContainerElement.createChild("div", "sources-toolbar-spacer");
52 this._bottomToolbar = new WebInspector.Toolbar("", this._toolbarContainerEle ment);
51 53
52 WebInspector.startBatchUpdate(); 54 WebInspector.startBatchUpdate();
53 workspace.uiSourceCodes().forEach(this._addUISourceCode.bind(this)); 55 workspace.uiSourceCodes().forEach(this._addUISourceCode.bind(this));
54 WebInspector.endBatchUpdate(); 56 WebInspector.endBatchUpdate();
55 57
56 workspace.addEventListener(WebInspector.Workspace.Events.UISourceCodeAdded, this._uiSourceCodeAdded, this); 58 workspace.addEventListener(WebInspector.Workspace.Events.UISourceCodeAdded, this._uiSourceCodeAdded, this);
57 workspace.addEventListener(WebInspector.Workspace.Events.UISourceCodeRemoved , this._uiSourceCodeRemoved, this); 59 workspace.addEventListener(WebInspector.Workspace.Events.UISourceCodeRemoved , this._uiSourceCodeRemoved, this);
58 workspace.addEventListener(WebInspector.Workspace.Events.ProjectRemoved, thi s._projectRemoved.bind(this), this); 60 workspace.addEventListener(WebInspector.Workspace.Events.ProjectRemoved, thi s._projectRemoved.bind(this), this);
59 61
60 /** 62 /**
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 143
142 /** 144 /**
143 * @return {!WebInspector.Toolbar} 145 * @return {!WebInspector.Toolbar}
144 */ 146 */
145 rightToolbar: function() 147 rightToolbar: function()
146 { 148 {
147 return this._editorContainer.rightToolbar(); 149 return this._editorContainer.rightToolbar();
148 }, 150 },
149 151
150 /** 152 /**
153 * @return {!WebInspector.Toolbar}
154 */
155 bottomToolbar: function()
156 {
157 return this._bottomToolbar;
158 },
159
160 /**
151 * @param {!Array.<!WebInspector.KeyboardShortcut.Descriptor>} keys 161 * @param {!Array.<!WebInspector.KeyboardShortcut.Descriptor>} keys
152 * @param {function(!Event=):boolean} handler 162 * @param {function(!Event=):boolean} handler
153 */ 163 */
154 _registerShortcuts: function(keys, handler) 164 _registerShortcuts: function(keys, handler)
155 { 165 {
156 for (var i = 0; i < keys.length; ++i) 166 for (var i = 0; i < keys.length; ++i)
157 this._shortcuts[keys[i].key] = handler; 167 this._shortcuts[keys[i].key] = handler;
158 }, 168 },
159 169
160 _handleKeyDown: function(event) 170 _handleKeyDown: function(event)
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 */ 813 */
804 handleAction: function(context, actionId) 814 handleAction: function(context, actionId)
805 { 815 {
806 var sourcesView = WebInspector.context.flavor(WebInspector.SourcesView); 816 var sourcesView = WebInspector.context.flavor(WebInspector.SourcesView);
807 if (!sourcesView) 817 if (!sourcesView)
808 return false; 818 return false;
809 sourcesView._editorContainer.closeAllFiles(); 819 sourcesView._editorContainer.closeAllFiles();
810 return true; 820 return true;
811 } 821 }
812 } 822 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698