From b7f33c139e681fbb5b223261aa455b35cce1056c Mon Sep 17 00:00:00 2001 From: pfeldman Date: Fri, 15 Jul 2016 19:42:33 -0700 Subject: [PATCH] DevTools: fix compilation for the VBoxes with toolbar items. Review-Url: https://codereview.chromium.org/2152093002 Cr-Commit-Position: refs/heads/master@{#405925} --- front_end/profiler/HeapSnapshotView.js | 7 ++++--- front_end/profiler/ProfileView.js | 7 ++++--- front_end/resources/ApplicationCacheItemsView.js | 7 ++++--- front_end/resources/CookieItemsView.js | 7 ++++--- front_end/resources/DOMStorageItemsView.js | 7 ++++--- front_end/resources/DatabaseQueryView.js | 8 -------- front_end/resources/DatabaseTableView.js | 7 ++++--- front_end/resources/IndexedDBViews.js | 15 ++++----------- front_end/resources/ResourcesPanel.js | 8 -------- front_end/resources/ServiceWorkerCacheViews.js | 7 ++++--- front_end/sources/SourcesView.js | 10 +++++----- 11 files changed, 37 insertions(+), 53 deletions(-) diff --git a/front_end/profiler/HeapSnapshotView.js b/front_end/profiler/HeapSnapshotView.js index 63240e23fe..df314978d8 100644 --- a/front_end/profiler/HeapSnapshotView.js +++ b/front_end/profiler/HeapSnapshotView.js @@ -32,13 +32,13 @@ * @constructor * @implements {WebInspector.ProfileType.DataDisplayDelegate} * @implements {WebInspector.Searchable} - * @extends {WebInspector.VBox} + * @extends {WebInspector.VBoxWithToolbarItems} * @param {!WebInspector.ProfileType.DataDisplayDelegate} dataDisplayDelegate * @param {!WebInspector.HeapProfileHeader} profile */ WebInspector.HeapSnapshotView = function(dataDisplayDelegate, profile) { - WebInspector.VBox.call(this); + WebInspector.VBoxWithToolbarItems.call(this); this.element.classList.add("heap-snapshot-view"); @@ -523,6 +523,7 @@ WebInspector.HeapSnapshotView.prototype = { }, /** + * @override * @return {!Array.} */ toolbarItems: function() @@ -1010,7 +1011,7 @@ WebInspector.HeapSnapshotView.prototype = { this._trackingOverviewGrid.dispose(); }, - __proto__: WebInspector.VBox.prototype + __proto__: WebInspector.VBoxWithToolbarItems.prototype } /** diff --git a/front_end/profiler/ProfileView.js b/front_end/profiler/ProfileView.js index ec8d71460d..2902078aa9 100644 --- a/front_end/profiler/ProfileView.js +++ b/front_end/profiler/ProfileView.js @@ -5,13 +5,13 @@ /** * @constructor * @implements {WebInspector.Searchable} - * @extends {WebInspector.VBox} + * @extends {WebInspector.VBoxWithToolbarItems} * @param {!WebInspector.ProfileDataGridNode.Formatter} nodeFormatter * @param {!Array=} viewTypes */ WebInspector.ProfileView = function(nodeFormatter, viewTypes) { - WebInspector.VBox.call(this); + WebInspector.VBoxWithToolbarItems.call(this); this._searchableView = new WebInspector.SearchableView(this); this._searchableView.setPlaceholder(WebInspector.UIString("Find by cost (>50ms), name or file")); @@ -110,6 +110,7 @@ WebInspector.ProfileView.prototype = { }, /** + * @override * @return {!Array.} */ toolbarItems: function() @@ -366,7 +367,7 @@ WebInspector.ProfileView.prototype = { this.refresh(); }, - __proto__: WebInspector.VBox.prototype + __proto__: WebInspector.VBoxWithToolbarItems.prototype } /** diff --git a/front_end/resources/ApplicationCacheItemsView.js b/front_end/resources/ApplicationCacheItemsView.js index 2a57256aee..9b3203e27c 100644 --- a/front_end/resources/ApplicationCacheItemsView.js +++ b/front_end/resources/ApplicationCacheItemsView.js @@ -25,11 +25,11 @@ /** * @constructor - * @extends {WebInspector.VBox} + * @extends {WebInspector.VBoxWithToolbarItems} */ WebInspector.ApplicationCacheItemsView = function(model, frameId) { - WebInspector.VBox.call(this); + WebInspector.VBoxWithToolbarItems.call(this); this._model = model; @@ -62,6 +62,7 @@ WebInspector.ApplicationCacheItemsView = function(model, frameId) WebInspector.ApplicationCacheItemsView.prototype = { /** + * @override * @return {!Array.} */ toolbarItems: function() @@ -257,6 +258,6 @@ WebInspector.ApplicationCacheItemsView.prototype = { // this._update(); }, - __proto__: WebInspector.VBox.prototype + __proto__: WebInspector.VBoxWithToolbarItems.prototype } diff --git a/front_end/resources/CookieItemsView.js b/front_end/resources/CookieItemsView.js index 9ee0058581..5742d04c5b 100644 --- a/front_end/resources/CookieItemsView.js +++ b/front_end/resources/CookieItemsView.js @@ -29,11 +29,11 @@ /** * @constructor - * @extends {WebInspector.VBox} + * @extends {WebInspector.VBoxWithToolbarItems} */ WebInspector.CookieItemsView = function(treeElement, cookieDomain) { - WebInspector.VBox.call(this); + WebInspector.VBoxWithToolbarItems.call(this); this.element.classList.add("storage-view"); @@ -59,6 +59,7 @@ WebInspector.CookieItemsView = function(treeElement, cookieDomain) WebInspector.CookieItemsView.prototype = { /** + * @override * @return {!Array.} */ toolbarItems: function() @@ -186,5 +187,5 @@ WebInspector.CookieItemsView.prototype = { } }, - __proto__: WebInspector.VBox.prototype + __proto__: WebInspector.VBoxWithToolbarItems.prototype } diff --git a/front_end/resources/DOMStorageItemsView.js b/front_end/resources/DOMStorageItemsView.js index 5cf67e76f5..51986a5d28 100644 --- a/front_end/resources/DOMStorageItemsView.js +++ b/front_end/resources/DOMStorageItemsView.js @@ -26,11 +26,11 @@ /** * @constructor - * @extends {WebInspector.VBox} + * @extends {WebInspector.VBoxWithToolbarItems} */ WebInspector.DOMStorageItemsView = function(domStorage) { - WebInspector.VBox.call(this); + WebInspector.VBoxWithToolbarItems.call(this); this.domStorage = domStorage; @@ -51,6 +51,7 @@ WebInspector.DOMStorageItemsView = function(domStorage) WebInspector.DOMStorageItemsView.prototype = { /** + * @override * @return {!Array.} */ toolbarItems: function() @@ -258,5 +259,5 @@ WebInspector.DOMStorageItemsView.prototype = { this.domStorage.removeItem(node.data.key); }, - __proto__: WebInspector.VBox.prototype + __proto__: WebInspector.VBoxWithToolbarItems.prototype } diff --git a/front_end/resources/DatabaseQueryView.js b/front_end/resources/DatabaseQueryView.js index 55cf8d312c..e231bcf18e 100644 --- a/front_end/resources/DatabaseQueryView.js +++ b/front_end/resources/DatabaseQueryView.js @@ -53,14 +53,6 @@ WebInspector.DatabaseQueryView.Events = { } WebInspector.DatabaseQueryView.prototype = { - /** - * @return {!Array.} - */ - toolbarItems: function() - { - return []; - }, - _messagesClicked: function() { if (!this._prompt.isCaretInsidePrompt() && this.element.isComponentSelectionCollapsed()) diff --git a/front_end/resources/DatabaseTableView.js b/front_end/resources/DatabaseTableView.js index 2ba9a58437..d3fb656110 100644 --- a/front_end/resources/DatabaseTableView.js +++ b/front_end/resources/DatabaseTableView.js @@ -25,11 +25,11 @@ /** * @constructor - * @extends {WebInspector.VBox} + * @extends {WebInspector.VBoxWithToolbarItems} */ WebInspector.DatabaseTableView = function(database, tableName) { - WebInspector.VBox.call(this); + WebInspector.VBoxWithToolbarItems.call(this); this.database = database; this.tableName = tableName; @@ -51,6 +51,7 @@ WebInspector.DatabaseTableView.prototype = { }, /** + * @override * @return {!Array.} */ toolbarItems: function() @@ -142,5 +143,5 @@ WebInspector.DatabaseTableView.prototype = { this.update(); }, - __proto__: WebInspector.VBox.prototype + __proto__: WebInspector.VBoxWithToolbarItems.prototype } diff --git a/front_end/resources/IndexedDBViews.js b/front_end/resources/IndexedDBViews.js index 1f3dae04f3..4dfbc07ebb 100644 --- a/front_end/resources/IndexedDBViews.js +++ b/front_end/resources/IndexedDBViews.js @@ -62,14 +62,6 @@ WebInspector.IDBDatabaseView = function(database) } WebInspector.IDBDatabaseView.prototype = { - /** - * @return {!Array.} - */ - toolbarItems: function() - { - return []; - }, - /** * @param {string} name * @param {string} value @@ -105,7 +97,7 @@ WebInspector.IDBDatabaseView.prototype = { /** * @constructor - * @extends {WebInspector.VBox} + * @extends {WebInspector.VBoxWithToolbarItems} * @param {!WebInspector.IndexedDBModel} model * @param {!WebInspector.IndexedDBModel.DatabaseId} databaseId * @param {!WebInspector.IndexedDBModel.ObjectStore} objectStore @@ -113,7 +105,7 @@ WebInspector.IDBDatabaseView.prototype = { */ WebInspector.IDBDataView = function(model, databaseId, objectStore, index) { - WebInspector.VBox.call(this); + WebInspector.VBoxWithToolbarItems.call(this); this.registerRequiredCSS("resources/indexedDBViews.css"); this._model = model; @@ -342,6 +334,7 @@ WebInspector.IDBDataView.prototype = { }, /** + * @override * @return {!Array.} */ toolbarItems: function() @@ -355,7 +348,7 @@ WebInspector.IDBDataView.prototype = { this._entries = []; }, - __proto__: WebInspector.VBox.prototype + __proto__: WebInspector.VBoxWithToolbarItems.prototype } /** diff --git a/front_end/resources/ResourcesPanel.js b/front_end/resources/ResourcesPanel.js index 3b3b82d32d..83d170e4c5 100644 --- a/front_end/resources/ResourcesPanel.js +++ b/front_end/resources/ResourcesPanel.js @@ -2172,14 +2172,6 @@ WebInspector.StorageCategoryView = function() } WebInspector.StorageCategoryView.prototype = { - /** - * @return {!Array.} - */ - toolbarItems: function() - { - return []; - }, - setText: function(text) { this._emptyWidget.text = text; diff --git a/front_end/resources/ServiceWorkerCacheViews.js b/front_end/resources/ServiceWorkerCacheViews.js index db781fc9a3..288f743434 100644 --- a/front_end/resources/ServiceWorkerCacheViews.js +++ b/front_end/resources/ServiceWorkerCacheViews.js @@ -4,13 +4,13 @@ /** * @constructor - * @extends {WebInspector.VBox} + * @extends {WebInspector.VBoxWithToolbarItems} * @param {!WebInspector.ServiceWorkerCacheModel} model * @param {!WebInspector.ServiceWorkerCacheModel.Cache} cache */ WebInspector.ServiceWorkerCacheView = function(model, cache) { - WebInspector.VBox.call(this); + WebInspector.VBoxWithToolbarItems.call(this); this.registerRequiredCSS("resources/serviceWorkerCacheViews.css"); this._model = model; @@ -145,6 +145,7 @@ WebInspector.ServiceWorkerCacheView.prototype = { }, /** + * @override * @return {!Array.} */ toolbarItems: function() @@ -158,5 +159,5 @@ WebInspector.ServiceWorkerCacheView.prototype = { this._entries = []; }, - __proto__: WebInspector.VBox.prototype + __proto__: WebInspector.VBoxWithToolbarItems.prototype } diff --git a/front_end/sources/SourcesView.js b/front_end/sources/SourcesView.js index 0324baae33..82d486e3a8 100644 --- a/front_end/sources/SourcesView.js +++ b/front_end/sources/SourcesView.js @@ -26,7 +26,7 @@ WebInspector.SourcesView = function(workspace, sourcesPanel) this._searchableView.setMinimalSearchQuerySize(0); this._searchableView.show(this.element); - /** @type {!Map.} */ + /** @type {!Map.} */ this._sourceViewByUISourceCode = new Map(); var tabbedEditorPlaceholderText = WebInspector.isMac() ? WebInspector.UIString("Hit Cmd+P to open a file") : WebInspector.UIString("Hit Ctrl+P to open a file"); @@ -281,9 +281,9 @@ WebInspector.SourcesView.prototype = { _updateScriptViewToolbarItems: function() { this._scriptViewToolbar.removeToolbarItems(); - var view = /** @type {?WebInspector.VBoxWithToolbarItems} */(this.visibleView()); - if (view) { - for (var item of view.toolbarItems()) + var view = this.visibleView() + if (view instanceof WebInspector.VBoxWithToolbarItems) { + for (var item of (/** @type {?WebInspector.VBoxWithToolbarItems} */(view)).toolbarItems()) this._scriptViewToolbar.appendToolbarItem(item); } }, @@ -332,7 +332,7 @@ WebInspector.SourcesView.prototype = { sourceFrame.setHighlighterType(WebInspector.NetworkProject.uiSourceCodeMimeType(uiSourceCode)); this._historyManager.trackSourceFrameCursorJumps(sourceFrame); } - this._sourceViewByUISourceCode.set(uiSourceCode, /** @type {!WebInspector.VBoxWithToolbarItems} */(sourceFrame || sourceView)); + this._sourceViewByUISourceCode.set(uiSourceCode, /** @type {!WebInspector.Widget} */(sourceFrame || sourceView)); return /** @type {!WebInspector.Widget} */(sourceFrame || sourceView); },