Skip to content

Commit

Permalink
DevTools: fix compilation for the VBoxes with toolbar items.
Browse files Browse the repository at this point in the history
Review-Url: https://codereview.chromium.org/2152093002
Cr-Commit-Position: refs/heads/master@{#405925}
  • Loading branch information
pavelfeldman authored and Commit bot committed Jul 16, 2016
1 parent b924c0b commit b7f33c1
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 53 deletions.
7 changes: 4 additions & 3 deletions front_end/profiler/HeapSnapshotView.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down Expand Up @@ -523,6 +523,7 @@ WebInspector.HeapSnapshotView.prototype = {
},

/**
* @override
* @return {!Array.<!WebInspector.ToolbarItem>}
*/
toolbarItems: function()
Expand Down Expand Up @@ -1010,7 +1011,7 @@ WebInspector.HeapSnapshotView.prototype = {
this._trackingOverviewGrid.dispose();
},

__proto__: WebInspector.VBox.prototype
__proto__: WebInspector.VBoxWithToolbarItems.prototype
}

/**
Expand Down
7 changes: 4 additions & 3 deletions front_end/profiler/ProfileView.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
/**
* @constructor
* @implements {WebInspector.Searchable}
* @extends {WebInspector.VBox}
* @extends {WebInspector.VBoxWithToolbarItems}
* @param {!WebInspector.ProfileDataGridNode.Formatter} nodeFormatter
* @param {!Array<string>=} 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"));
Expand Down Expand Up @@ -110,6 +110,7 @@ WebInspector.ProfileView.prototype = {
},

/**
* @override
* @return {!Array.<!WebInspector.ToolbarItem>}
*/
toolbarItems: function()
Expand Down Expand Up @@ -366,7 +367,7 @@ WebInspector.ProfileView.prototype = {
this.refresh();
},

__proto__: WebInspector.VBox.prototype
__proto__: WebInspector.VBoxWithToolbarItems.prototype
}

/**
Expand Down
7 changes: 4 additions & 3 deletions front_end/resources/ApplicationCacheItemsView.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -62,6 +62,7 @@ WebInspector.ApplicationCacheItemsView = function(model, frameId)

WebInspector.ApplicationCacheItemsView.prototype = {
/**
* @override
* @return {!Array.<!WebInspector.ToolbarItem>}
*/
toolbarItems: function()
Expand Down Expand Up @@ -257,6 +258,6 @@ WebInspector.ApplicationCacheItemsView.prototype = {
// this._update();
},

__proto__: WebInspector.VBox.prototype
__proto__: WebInspector.VBoxWithToolbarItems.prototype
}

7 changes: 4 additions & 3 deletions front_end/resources/CookieItemsView.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand All @@ -59,6 +59,7 @@ WebInspector.CookieItemsView = function(treeElement, cookieDomain)

WebInspector.CookieItemsView.prototype = {
/**
* @override
* @return {!Array.<!WebInspector.ToolbarItem>}
*/
toolbarItems: function()
Expand Down Expand Up @@ -186,5 +187,5 @@ WebInspector.CookieItemsView.prototype = {
}
},

__proto__: WebInspector.VBox.prototype
__proto__: WebInspector.VBoxWithToolbarItems.prototype
}
7 changes: 4 additions & 3 deletions front_end/resources/DOMStorageItemsView.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -51,6 +51,7 @@ WebInspector.DOMStorageItemsView = function(domStorage)

WebInspector.DOMStorageItemsView.prototype = {
/**
* @override
* @return {!Array.<!WebInspector.ToolbarItem>}
*/
toolbarItems: function()
Expand Down Expand Up @@ -258,5 +259,5 @@ WebInspector.DOMStorageItemsView.prototype = {
this.domStorage.removeItem(node.data.key);
},

__proto__: WebInspector.VBox.prototype
__proto__: WebInspector.VBoxWithToolbarItems.prototype
}
8 changes: 0 additions & 8 deletions front_end/resources/DatabaseQueryView.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,6 @@ WebInspector.DatabaseQueryView.Events = {
}

WebInspector.DatabaseQueryView.prototype = {
/**
* @return {!Array.<!WebInspector.ToolbarItem>}
*/
toolbarItems: function()
{
return [];
},

_messagesClicked: function()
{
if (!this._prompt.isCaretInsidePrompt() && this.element.isComponentSelectionCollapsed())
Expand Down
7 changes: 4 additions & 3 deletions front_end/resources/DatabaseTableView.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -51,6 +51,7 @@ WebInspector.DatabaseTableView.prototype = {
},

/**
* @override
* @return {!Array.<!WebInspector.ToolbarItem>}
*/
toolbarItems: function()
Expand Down Expand Up @@ -142,5 +143,5 @@ WebInspector.DatabaseTableView.prototype = {
this.update();
},

__proto__: WebInspector.VBox.prototype
__proto__: WebInspector.VBoxWithToolbarItems.prototype
}
15 changes: 4 additions & 11 deletions front_end/resources/IndexedDBViews.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,6 @@ WebInspector.IDBDatabaseView = function(database)
}

WebInspector.IDBDatabaseView.prototype = {
/**
* @return {!Array.<!WebInspector.ToolbarItem>}
*/
toolbarItems: function()
{
return [];
},

/**
* @param {string} name
* @param {string} value
Expand Down Expand Up @@ -105,15 +97,15 @@ WebInspector.IDBDatabaseView.prototype = {

/**
* @constructor
* @extends {WebInspector.VBox}
* @extends {WebInspector.VBoxWithToolbarItems}
* @param {!WebInspector.IndexedDBModel} model
* @param {!WebInspector.IndexedDBModel.DatabaseId} databaseId
* @param {!WebInspector.IndexedDBModel.ObjectStore} objectStore
* @param {?WebInspector.IndexedDBModel.Index} index
*/
WebInspector.IDBDataView = function(model, databaseId, objectStore, index)
{
WebInspector.VBox.call(this);
WebInspector.VBoxWithToolbarItems.call(this);
this.registerRequiredCSS("resources/indexedDBViews.css");

this._model = model;
Expand Down Expand Up @@ -342,6 +334,7 @@ WebInspector.IDBDataView.prototype = {
},

/**
* @override
* @return {!Array.<!WebInspector.ToolbarItem>}
*/
toolbarItems: function()
Expand All @@ -355,7 +348,7 @@ WebInspector.IDBDataView.prototype = {
this._entries = [];
},

__proto__: WebInspector.VBox.prototype
__proto__: WebInspector.VBoxWithToolbarItems.prototype
}

/**
Expand Down
8 changes: 0 additions & 8 deletions front_end/resources/ResourcesPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -2172,14 +2172,6 @@ WebInspector.StorageCategoryView = function()
}

WebInspector.StorageCategoryView.prototype = {
/**
* @return {!Array.<!WebInspector.ToolbarItem>}
*/
toolbarItems: function()
{
return [];
},

setText: function(text)
{
this._emptyWidget.text = text;
Expand Down
7 changes: 4 additions & 3 deletions front_end/resources/ServiceWorkerCacheViews.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -145,6 +145,7 @@ WebInspector.ServiceWorkerCacheView.prototype = {
},

/**
* @override
* @return {!Array.<!WebInspector.ToolbarItem>}
*/
toolbarItems: function()
Expand All @@ -158,5 +159,5 @@ WebInspector.ServiceWorkerCacheView.prototype = {
this._entries = [];
},

__proto__: WebInspector.VBox.prototype
__proto__: WebInspector.VBoxWithToolbarItems.prototype
}
10 changes: 5 additions & 5 deletions front_end/sources/SourcesView.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ WebInspector.SourcesView = function(workspace, sourcesPanel)
this._searchableView.setMinimalSearchQuerySize(0);
this._searchableView.show(this.element);

/** @type {!Map.<!WebInspector.UISourceCode, !WebInspector.VBoxWithToolbarItems>} */
/** @type {!Map.<!WebInspector.UISourceCode, !WebInspector.Widget>} */
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");
Expand Down Expand Up @@ -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);
}
},
Expand Down Expand Up @@ -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);
},

Expand Down

0 comments on commit b7f33c1

Please sign in to comment.