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

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

Issue 2157713002: DevTools: introduce View: a named widget with the toolbar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: lcean 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 // 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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 { 275 {
276 var project = event.data; 276 var project = event.data;
277 var uiSourceCodes = project.uiSourceCodes(); 277 var uiSourceCodes = project.uiSourceCodes();
278 this._removeUISourceCodes(uiSourceCodes); 278 this._removeUISourceCodes(uiSourceCodes);
279 }, 279 },
280 280
281 _updateScriptViewToolbarItems: function() 281 _updateScriptViewToolbarItems: function()
282 { 282 {
283 this._scriptViewToolbar.removeToolbarItems(); 283 this._scriptViewToolbar.removeToolbarItems();
284 var view = this.visibleView() 284 var view = this.visibleView()
285 if (view instanceof WebInspector.VBoxWithToolbarItems) { 285 if (view instanceof WebInspector.View) {
286 for (var item of (/** @type {?WebInspector.VBoxWithToolbarItems} */( view)).toolbarItems()) 286 for (var item of (/** @type {?WebInspector.View} */(view)).toolbarIt ems())
287 this._scriptViewToolbar.appendToolbarItem(item); 287 this._scriptViewToolbar.appendToolbarItem(item);
288 } 288 }
289 }, 289 },
290 290
291 /** 291 /**
292 * @param {!WebInspector.UISourceCode} uiSourceCode 292 * @param {!WebInspector.UISourceCode} uiSourceCode
293 * @param {number=} lineNumber 0-based 293 * @param {number=} lineNumber 0-based
294 * @param {number=} columnNumber 294 * @param {number=} columnNumber
295 * @param {boolean=} omitFocus 295 * @param {boolean=} omitFocus
296 * @param {boolean=} omitHighlight 296 * @param {boolean=} omitHighlight
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 */ 784 */
785 handleAction: function(context, actionId) 785 handleAction: function(context, actionId)
786 { 786 {
787 var sourcesView = WebInspector.context.flavor(WebInspector.SourcesView); 787 var sourcesView = WebInspector.context.flavor(WebInspector.SourcesView);
788 if (!sourcesView) 788 if (!sourcesView)
789 return false; 789 return false;
790 sourcesView._editorContainer.closeAllFiles(); 790 sourcesView._editorContainer.closeAllFiles();
791 return true; 791 return true;
792 } 792 }
793 } 793 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698