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

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/View.js

Issue 2493373002: DevTools: rename WebInspector into modules. (Closed)
Patch Set: for bots 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/ui/View.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/View.js b/third_party/WebKit/Source/devtools/front_end/ui/View.js
index 1346f0b6e34a6e1281e45d300792b3aa42841925..ed6b26773a47f6570185a6d8cc0e3574e1ca919a 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/View.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/View.js
@@ -4,9 +4,9 @@
/**
* @interface
*/
-WebInspector.View = function() {};
+UI.View = function() {};
-WebInspector.View.prototype = {
+UI.View.prototype = {
/**
* @return {string}
*/
@@ -28,24 +28,24 @@ WebInspector.View.prototype = {
isTransient: function() {},
/**
- * @return {!Promise<!Array<!WebInspector.ToolbarItem>>}
+ * @return {!Promise<!Array<!UI.ToolbarItem>>}
*/
toolbarItems: function() {},
/**
- * @return {!Promise<!WebInspector.Widget>}
+ * @return {!Promise<!UI.Widget>}
*/
widget: function() {}
};
-WebInspector.View._symbol = Symbol('view');
-WebInspector.View._widgetSymbol = Symbol('widget');
+UI.View._symbol = Symbol('view');
+UI.View._widgetSymbol = Symbol('widget');
/**
- * @implements {WebInspector.View}
+ * @implements {UI.View}
* @unrestricted
*/
-WebInspector.SimpleView = class extends WebInspector.VBox {
+UI.SimpleView = class extends UI.VBox {
/**
* @param {string} title
* @param {boolean=} isWebComponent
@@ -53,9 +53,9 @@ WebInspector.SimpleView = class extends WebInspector.VBox {
constructor(title, isWebComponent) {
super(isWebComponent);
this._title = title;
- /** @type {!Array<!WebInspector.ToolbarItem>} */
+ /** @type {!Array<!UI.ToolbarItem>} */
this._toolbarItems = [];
- this[WebInspector.View._symbol] = this;
+ this[UI.View._symbol] = this;
}
/**
@@ -92,14 +92,14 @@ WebInspector.SimpleView = class extends WebInspector.VBox {
/**
* @override
- * @return {!Promise<!Array<!WebInspector.ToolbarItem>>}
+ * @return {!Promise<!Array<!UI.ToolbarItem>>}
*/
toolbarItems() {
return Promise.resolve(this.syncToolbarItems());
}
/**
- * @return {!Array<!WebInspector.ToolbarItem>}
+ * @return {!Array<!UI.ToolbarItem>}
*/
syncToolbarItems() {
return this._toolbarItems;
@@ -107,14 +107,14 @@ WebInspector.SimpleView = class extends WebInspector.VBox {
/**
* @override
- * @return {!Promise<!WebInspector.Widget>}
+ * @return {!Promise<!UI.Widget>}
*/
widget() {
- return /** @type {!Promise<!WebInspector.Widget>} */ (Promise.resolve(this));
+ return /** @type {!Promise<!UI.Widget>} */ (Promise.resolve(this));
}
/**
- * @param {!WebInspector.ToolbarItem} item
+ * @param {!UI.ToolbarItem} item
*/
addToolbarItem(item) {
this._toolbarItems.push(item);
@@ -124,15 +124,15 @@ WebInspector.SimpleView = class extends WebInspector.VBox {
* @return {!Promise}
*/
revealView() {
- return WebInspector.viewManager.revealView(this);
+ return UI.viewManager.revealView(this);
}
};
/**
- * @implements {WebInspector.View}
+ * @implements {UI.View}
* @unrestricted
*/
-WebInspector.ProvidedView = class {
+UI.ProvidedView = class {
/**
* @param {!Runtime.Extension} extension
*/
@@ -174,14 +174,14 @@ WebInspector.ProvidedView = class {
/**
* @override
- * @return {!Promise<!Array<!WebInspector.ToolbarItem>>}
+ * @return {!Promise<!Array<!UI.ToolbarItem>>}
*/
toolbarItems() {
var actionIds = this._extension.descriptor()['actionIds'];
if (actionIds) {
var result = [];
for (var id of actionIds.split(',')) {
- var item = WebInspector.Toolbar.createActionButtonForId(id.trim());
+ var item = UI.Toolbar.createActionButtonForId(id.trim());
if (item)
result.push(item);
}
@@ -190,20 +190,20 @@ WebInspector.ProvidedView = class {
if (this._extension.descriptor()['hasToolbar'])
return this.widget().then(
- widget => /** @type {!WebInspector.ToolbarItem.ItemsProvider} */ (widget).toolbarItems());
+ widget => /** @type {!UI.ToolbarItem.ItemsProvider} */ (widget).toolbarItems());
return Promise.resolve([]);
}
/**
* @override
- * @return {!Promise<!WebInspector.Widget>}
+ * @return {!Promise<!UI.Widget>}
*/
widget() {
return this._extension.instance().then(widget => {
- if (!(widget instanceof WebInspector.Widget))
- throw new Error('view className should point to a WebInspector.Widget');
- widget[WebInspector.View._symbol] = this;
- return /** @type {!WebInspector.Widget} */ (widget);
+ if (!(widget instanceof UI.Widget))
+ throw new Error('view className should point to a UI.Widget');
+ widget[UI.View._symbol] = this;
+ return /** @type {!UI.Widget} */ (widget);
});
}
};
@@ -211,47 +211,47 @@ WebInspector.ProvidedView = class {
/**
* @interface
*/
-WebInspector.ViewLocation = function() {};
+UI.ViewLocation = function() {};
-WebInspector.ViewLocation.prototype = {
+UI.ViewLocation.prototype = {
/**
* @param {string} locationName
*/
appendApplicableItems: function(locationName) {},
/**
- * @param {!WebInspector.View} view
- * @param {?WebInspector.View=} insertBefore
+ * @param {!UI.View} view
+ * @param {?UI.View=} insertBefore
*/
appendView: function(view, insertBefore) {},
/**
- * @param {!WebInspector.View} view
- * @param {?WebInspector.View=} insertBefore
+ * @param {!UI.View} view
+ * @param {?UI.View=} insertBefore
* @return {!Promise}
*/
showView: function(view, insertBefore) {},
/**
- * @param {!WebInspector.View} view
+ * @param {!UI.View} view
*/
removeView: function(view) {},
/**
- * @return {!WebInspector.Widget}
+ * @return {!UI.Widget}
*/
widget: function() {}
};
/**
* @interface
- * @extends {WebInspector.ViewLocation}
+ * @extends {UI.ViewLocation}
*/
-WebInspector.TabbedViewLocation = function() {};
+UI.TabbedViewLocation = function() {};
-WebInspector.TabbedViewLocation.prototype = {
+UI.TabbedViewLocation.prototype = {
/**
- * @return {!WebInspector.TabbedPane}
+ * @return {!UI.TabbedPane}
*/
tabbedPane: function() {},
@@ -261,12 +261,12 @@ WebInspector.TabbedViewLocation.prototype = {
/**
* @interface
*/
-WebInspector.ViewLocationResolver = function() {};
+UI.ViewLocationResolver = function() {};
-WebInspector.ViewLocationResolver.prototype = {
+UI.ViewLocationResolver.prototype = {
/**
* @param {string} location
- * @return {?WebInspector.ViewLocation}
+ * @return {?UI.ViewLocation}
*/
resolveLocation: function(location) {}
};
@@ -274,39 +274,39 @@ WebInspector.ViewLocationResolver.prototype = {
/**
* @unrestricted
*/
-WebInspector.ViewManager = class {
+UI.ViewManager = class {
constructor() {
- /** @type {!Map<string, !WebInspector.View>} */
+ /** @type {!Map<string, !UI.View>} */
this._views = new Map();
/** @type {!Map<string, string>} */
this._locationNameByViewId = new Map();
for (var extension of self.runtime.extensions('view')) {
var descriptor = extension.descriptor();
- this._views.set(descriptor['id'], new WebInspector.ProvidedView(extension));
+ this._views.set(descriptor['id'], new UI.ProvidedView(extension));
this._locationNameByViewId.set(descriptor['id'], descriptor['location']);
}
}
/**
* @param {!Element} element
- * @param {!Array<!WebInspector.ToolbarItem>} toolbarItems
+ * @param {!Array<!UI.ToolbarItem>} toolbarItems
*/
static _populateToolbar(element, toolbarItems) {
if (!toolbarItems.length)
return;
- var toolbar = new WebInspector.Toolbar('');
+ var toolbar = new UI.Toolbar('');
element.insertBefore(toolbar.element, element.firstChild);
for (var item of toolbarItems)
toolbar.appendToolbarItem(item);
}
/**
- * @param {!WebInspector.View} view
+ * @param {!UI.View} view
* @return {!Promise}
*/
revealView(view) {
- var location = /** @type {?WebInspector.ViewManager._Location} */ (view[WebInspector.ViewManager._Location.symbol]);
+ var location = /** @type {?UI.ViewManager._Location} */ (view[UI.ViewManager._Location.symbol]);
if (!location)
return Promise.resolve();
location._reveal();
@@ -315,7 +315,7 @@ WebInspector.ViewManager = class {
/**
* @param {string} viewId
- * @return {?WebInspector.View}
+ * @return {?UI.View}
*/
view(viewId) {
return this._views.get(viewId);
@@ -323,11 +323,11 @@ WebInspector.ViewManager = class {
/**
* @param {string} viewId
- * @return {?WebInspector.Widget}
+ * @return {?UI.Widget}
*/
materializedWidget(viewId) {
var view = this.view(viewId);
- return view ? view[WebInspector.View._widgetSymbol] : null;
+ return view ? view[UI.View._widgetSymbol] : null;
}
/**
@@ -343,9 +343,9 @@ WebInspector.ViewManager = class {
var locationName = this._locationNameByViewId.get(viewId);
if (locationName === 'drawer-view')
- WebInspector.userMetrics.drawerShown(viewId);
+ Host.userMetrics.drawerShown(viewId);
- var location = view[WebInspector.ViewManager._Location.symbol];
+ var location = view[UI.ViewManager._Location.symbol];
if (location) {
location._reveal();
return location.showView(view);
@@ -361,19 +361,19 @@ WebInspector.ViewManager = class {
/**
* @param {string=} location
- * @return {!Promise<?WebInspector.ViewManager._Location>}
+ * @return {!Promise<?UI.ViewManager._Location>}
*/
_resolveLocation(location) {
if (!location)
- return /** @type {!Promise<?WebInspector.ViewManager._Location>} */ (Promise.resolve(null));
+ return /** @type {!Promise<?UI.ViewManager._Location>} */ (Promise.resolve(null));
- var resolverExtensions = self.runtime.extensions(WebInspector.ViewLocationResolver)
+ var resolverExtensions = self.runtime.extensions(UI.ViewLocationResolver)
.filter(extension => extension.descriptor()['name'] === location);
if (!resolverExtensions.length)
throw new Error('Unresolved location: ' + location);
var resolverExtension = resolverExtensions[0];
return resolverExtension.instance().then(
- resolver => /** @type {?WebInspector.ViewManager._Location} */ (resolver.resolveLocation(location)));
+ resolver => /** @type {?UI.ViewManager._Location} */ (resolver.resolveLocation(location)));
}
/**
@@ -381,24 +381,24 @@ WebInspector.ViewManager = class {
* @param {string=} location
* @param {boolean=} restoreSelection
* @param {boolean=} allowReorder
- * @return {!WebInspector.TabbedViewLocation}
+ * @return {!UI.TabbedViewLocation}
*/
createTabbedLocation(revealCallback, location, restoreSelection, allowReorder) {
- return new WebInspector.ViewManager._TabbedLocation(this, revealCallback, location, restoreSelection, allowReorder);
+ return new UI.ViewManager._TabbedLocation(this, revealCallback, location, restoreSelection, allowReorder);
}
/**
* @param {function()=} revealCallback
* @param {string=} location
- * @return {!WebInspector.ViewLocation}
+ * @return {!UI.ViewLocation}
*/
createStackLocation(revealCallback, location) {
- return new WebInspector.ViewManager._StackLocation(this, revealCallback, location);
+ return new UI.ViewManager._StackLocation(this, revealCallback, location);
}
/**
* @param {string} location
- * @return {!Array<!WebInspector.View>}
+ * @return {!Array<!UI.View>}
*/
_viewsForLocation(location) {
var result = [];
@@ -414,9 +414,9 @@ WebInspector.ViewManager = class {
/**
* @unrestricted
*/
-WebInspector.ViewManager._ContainerWidget = class extends WebInspector.VBox {
+UI.ViewManager._ContainerWidget = class extends UI.VBox {
/**
- * @param {!WebInspector.View} view
+ * @param {!UI.View} view
*/
constructor(view) {
super();
@@ -434,12 +434,12 @@ WebInspector.ViewManager._ContainerWidget = class extends WebInspector.VBox {
return this._materializePromise;
var promises = [];
promises.push(this._view.toolbarItems().then(
- WebInspector.ViewManager._populateToolbar.bind(WebInspector.ViewManager, this.element)));
+ UI.ViewManager._populateToolbar.bind(UI.ViewManager, this.element)));
promises.push(this._view.widget().then(widget => {
// Move focus from |this| to loaded |widget| if any.
var shouldFocus = this.element.hasFocus();
this.setDefaultFocusedElement(null);
- this._view[WebInspector.View._widgetSymbol] = widget;
+ this._view[UI.View._widgetSymbol] = widget;
widget.show(this.element);
if (shouldFocus)
widget.focus();
@@ -452,9 +452,9 @@ WebInspector.ViewManager._ContainerWidget = class extends WebInspector.VBox {
/**
* @unrestricted
*/
-WebInspector.ViewManager._ExpandableContainerWidget = class extends WebInspector.VBox {
+UI.ViewManager._ExpandableContainerWidget = class extends UI.VBox {
/**
- * @param {!WebInspector.View} view
+ * @param {!UI.View} view
*/
constructor(view) {
super(true);
@@ -470,7 +470,7 @@ WebInspector.ViewManager._ExpandableContainerWidget = class extends WebInspector
this.contentElement.createChild('content');
this._view = view;
- view[WebInspector.ViewManager._ExpandableContainerWidget._symbol] = this;
+ view[UI.ViewManager._ExpandableContainerWidget._symbol] = this;
}
/**
@@ -481,10 +481,10 @@ WebInspector.ViewManager._ExpandableContainerWidget = class extends WebInspector
return this._materializePromise;
var promises = [];
promises.push(this._view.toolbarItems().then(
- WebInspector.ViewManager._populateToolbar.bind(WebInspector.ViewManager, this._titleElement)));
+ UI.ViewManager._populateToolbar.bind(UI.ViewManager, this._titleElement)));
promises.push(this._view.widget().then(widget => {
this._widget = widget;
- this._view[WebInspector.View._widgetSymbol] = widget;
+ this._view[UI.View._widgetSymbol] = widget;
widget.show(this.element);
}));
this._materializePromise = Promise.all(promises);
@@ -519,20 +519,20 @@ WebInspector.ViewManager._ExpandableContainerWidget = class extends WebInspector
* @param {!Event} event
*/
_onTitleKeyDown(event) {
- if (isEnterKey(event) || event.keyCode === WebInspector.KeyboardShortcut.Keys.Space.code)
+ if (isEnterKey(event) || event.keyCode === UI.KeyboardShortcut.Keys.Space.code)
this._toggleExpanded();
}
};
-WebInspector.ViewManager._ExpandableContainerWidget._symbol = Symbol('container');
+UI.ViewManager._ExpandableContainerWidget._symbol = Symbol('container');
/**
* @unrestricted
*/
-WebInspector.ViewManager._Location = class {
+UI.ViewManager._Location = class {
/**
- * @param {!WebInspector.ViewManager} manager
- * @param {!WebInspector.Widget} widget
+ * @param {!UI.ViewManager} manager
+ * @param {!UI.Widget} widget
* @param {function()=} revealCallback
*/
constructor(manager, widget, revealCallback) {
@@ -542,7 +542,7 @@ WebInspector.ViewManager._Location = class {
}
/**
- * @return {!WebInspector.Widget}
+ * @return {!UI.Widget}
*/
widget() {
return this._widget;
@@ -554,22 +554,22 @@ WebInspector.ViewManager._Location = class {
}
};
-WebInspector.ViewManager._Location.symbol = Symbol('location');
+UI.ViewManager._Location.symbol = Symbol('location');
/**
- * @implements {WebInspector.TabbedViewLocation}
+ * @implements {UI.TabbedViewLocation}
* @unrestricted
*/
-WebInspector.ViewManager._TabbedLocation = class extends WebInspector.ViewManager._Location {
+UI.ViewManager._TabbedLocation = class extends UI.ViewManager._Location {
/**
- * @param {!WebInspector.ViewManager} manager
+ * @param {!UI.ViewManager} manager
* @param {function()=} revealCallback
* @param {string=} location
* @param {boolean=} restoreSelection
* @param {boolean=} allowReorder
*/
constructor(manager, revealCallback, location, restoreSelection, allowReorder) {
- var tabbedPane = new WebInspector.TabbedPane();
+ var tabbedPane = new UI.TabbedPane();
if (allowReorder)
tabbedPane.setAllowTabReorder(true);
@@ -577,15 +577,15 @@ WebInspector.ViewManager._TabbedLocation = class extends WebInspector.ViewManage
this._tabbedPane = tabbedPane;
this._allowReorder = allowReorder;
- this._tabbedPane.addEventListener(WebInspector.TabbedPane.Events.TabSelected, this._tabSelected, this);
- this._tabbedPane.addEventListener(WebInspector.TabbedPane.Events.TabClosed, this._tabClosed, this);
- this._closeableTabSetting = WebInspector.settings.createSetting(location + '-closeableTabs', {});
- this._tabOrderSetting = WebInspector.settings.createSetting(location + '-tabOrder', {});
- this._tabbedPane.addEventListener(WebInspector.TabbedPane.Events.TabOrderChanged, this._persistTabOrder, this);
+ this._tabbedPane.addEventListener(UI.TabbedPane.Events.TabSelected, this._tabSelected, this);
+ this._tabbedPane.addEventListener(UI.TabbedPane.Events.TabClosed, this._tabClosed, this);
+ this._closeableTabSetting = Common.settings.createSetting(location + '-closeableTabs', {});
+ this._tabOrderSetting = Common.settings.createSetting(location + '-tabOrder', {});
+ this._tabbedPane.addEventListener(UI.TabbedPane.Events.TabOrderChanged, this._persistTabOrder, this);
if (restoreSelection)
- this._lastSelectedTabSetting = WebInspector.settings.createSetting(location + '-selectedTab', '');
+ this._lastSelectedTabSetting = Common.settings.createSetting(location + '-selectedTab', '');
- /** @type {!Map.<string, !WebInspector.View>} */
+ /** @type {!Map.<string, !UI.View>} */
this._views = new Map();
if (location)
@@ -594,7 +594,7 @@ WebInspector.ViewManager._TabbedLocation = class extends WebInspector.ViewManage
/**
* @override
- * @return {!WebInspector.Widget}
+ * @return {!UI.Widget}
*/
widget() {
return this._tabbedPane;
@@ -602,7 +602,7 @@ WebInspector.ViewManager._TabbedLocation = class extends WebInspector.ViewManage
/**
* @override
- * @return {!WebInspector.TabbedPane}
+ * @return {!UI.TabbedPane}
*/
tabbedPane() {
return this._tabbedPane;
@@ -613,7 +613,7 @@ WebInspector.ViewManager._TabbedLocation = class extends WebInspector.ViewManage
*/
enableMoreTabsButton() {
this._tabbedPane.leftToolbar().appendToolbarItem(
- new WebInspector.ToolbarMenuButton(this._appendTabsToMenu.bind(this)));
+ new UI.ToolbarMenuButton(this._appendTabsToMenu.bind(this)));
this._tabbedPane.disableOverflowMenu();
}
@@ -630,14 +630,14 @@ WebInspector.ViewManager._TabbedLocation = class extends WebInspector.ViewManage
for (var view of views)
orders.set(
view.viewId(),
- persistedOrders[view.viewId()] || (++i) * WebInspector.ViewManager._TabbedLocation.orderStep);
+ persistedOrders[view.viewId()] || (++i) * UI.ViewManager._TabbedLocation.orderStep);
views.sort((a, b) => orders.get(a.viewId()) - orders.get(b.viewId()));
}
for (var view of views) {
var id = view.viewId();
this._views.set(id, view);
- view[WebInspector.ViewManager._Location.symbol] = this;
+ view[UI.ViewManager._Location.symbol] = this;
if (view.isTransient())
continue;
if (!view.isCloseable())
@@ -650,34 +650,34 @@ WebInspector.ViewManager._TabbedLocation = class extends WebInspector.ViewManage
}
/**
- * @param {!WebInspector.ContextMenu} contextMenu
+ * @param {!UI.ContextMenu} contextMenu
*/
_appendTabsToMenu(contextMenu) {
for (var view of this._views.values()) {
- var title = WebInspector.UIString(view.title());
+ var title = Common.UIString(view.title());
contextMenu.appendItem(title, this.showView.bind(this, view));
}
}
/**
- * @param {!WebInspector.View} view
+ * @param {!UI.View} view
* @param {number=} index
*/
_appendTab(view, index) {
this._tabbedPane.appendTab(
- view.viewId(), view.title(), new WebInspector.ViewManager._ContainerWidget(view), undefined, false,
+ view.viewId(), view.title(), new UI.ViewManager._ContainerWidget(view), undefined, false,
view.isCloseable() || view.isTransient(), index);
}
/**
* @override
- * @param {!WebInspector.View} view
- * @param {?WebInspector.View=} insertBefore
+ * @param {!UI.View} view
+ * @param {?UI.View=} insertBefore
*/
appendView(view, insertBefore) {
if (this._tabbedPane.hasTab(view.viewId()))
return;
- view[WebInspector.ViewManager._Location.symbol] = this;
+ view[UI.ViewManager._Location.symbol] = this;
this._manager._views.set(view.viewId(), view);
this._views.set(view.viewId(), view);
@@ -705,8 +705,8 @@ WebInspector.ViewManager._TabbedLocation = class extends WebInspector.ViewManage
/**
* @override
- * @param {!WebInspector.View} view
- * @param {?WebInspector.View=} insertBefore
+ * @param {!UI.View} view
+ * @param {?UI.View=} insertBefore
* @return {!Promise}
*/
showView(view, insertBefore) {
@@ -717,21 +717,21 @@ WebInspector.ViewManager._TabbedLocation = class extends WebInspector.ViewManage
}
/**
- * @param {!WebInspector.View} view
+ * @param {!UI.View} view
* @override
*/
removeView(view) {
if (!this._tabbedPane.hasTab(view.viewId()))
return;
- delete view[WebInspector.ViewManager._Location.symbol];
+ delete view[UI.ViewManager._Location.symbol];
this._manager._views.delete(view.viewId());
this._views.delete(view.viewId());
this._tabbedPane.closeTab(view.viewId());
}
/**
- * @param {!WebInspector.Event} event
+ * @param {!Common.Event} event
*/
_tabSelected(event) {
var tabId = /** @type {string} */ (event.data.tabId);
@@ -753,7 +753,7 @@ WebInspector.ViewManager._TabbedLocation = class extends WebInspector.ViewManage
}
/**
- * @param {!WebInspector.Event} event
+ * @param {!Common.Event} event
*/
_tabClosed(event) {
var id = /** @type {string} */ (event.data['tabId']);
@@ -765,44 +765,44 @@ WebInspector.ViewManager._TabbedLocation = class extends WebInspector.ViewManage
}
/**
- * @param {!WebInspector.View} view
+ * @param {!UI.View} view
* @return {!Promise}
*/
_materializeWidget(view) {
- var widget = /** @type {!WebInspector.ViewManager._ContainerWidget} */ (this._tabbedPane.tabView(view.viewId()));
+ var widget = /** @type {!UI.ViewManager._ContainerWidget} */ (this._tabbedPane.tabView(view.viewId()));
return widget._materialize();
}
/**
- * @param {!WebInspector.Event} event
+ * @param {!Common.Event} event
*/
_persistTabOrder(event) {
var tabIds = this._tabbedPane.tabIds();
var tabOrders = {};
for (var i = 0; i < tabIds.length; i++)
- tabOrders[tabIds[i]] = (i + 1) * WebInspector.ViewManager._TabbedLocation.orderStep;
+ tabOrders[tabIds[i]] = (i + 1) * UI.ViewManager._TabbedLocation.orderStep;
this._tabOrderSetting.set(tabOrders);
}
};
-WebInspector.ViewManager._TabbedLocation.orderStep = 10; // Keep in sync with descriptors.
+UI.ViewManager._TabbedLocation.orderStep = 10; // Keep in sync with descriptors.
/**
- * @implements {WebInspector.ViewLocation}
+ * @implements {UI.ViewLocation}
* @unrestricted
*/
-WebInspector.ViewManager._StackLocation = class extends WebInspector.ViewManager._Location {
+UI.ViewManager._StackLocation = class extends UI.ViewManager._Location {
/**
- * @param {!WebInspector.ViewManager} manager
+ * @param {!UI.ViewManager} manager
* @param {function()=} revealCallback
* @param {string=} location
*/
constructor(manager, revealCallback, location) {
- var vbox = new WebInspector.VBox();
+ var vbox = new UI.VBox();
super(manager, vbox, revealCallback);
this._vbox = vbox;
- /** @type {!Map<string, !WebInspector.ViewManager._ExpandableContainerWidget>} */
+ /** @type {!Map<string, !UI.ViewManager._ExpandableContainerWidget>} */
this._expandableContainers = new Map();
if (location)
@@ -811,18 +811,18 @@ WebInspector.ViewManager._StackLocation = class extends WebInspector.ViewManager
/**
* @override
- * @param {!WebInspector.View} view
- * @param {?WebInspector.View=} insertBefore
+ * @param {!UI.View} view
+ * @param {?UI.View=} insertBefore
*/
appendView(view, insertBefore) {
var container = this._expandableContainers.get(view.viewId());
if (!container) {
- view[WebInspector.ViewManager._Location.symbol] = this;
+ view[UI.ViewManager._Location.symbol] = this;
this._manager._views.set(view.viewId(), view);
- container = new WebInspector.ViewManager._ExpandableContainerWidget(view);
+ container = new UI.ViewManager._ExpandableContainerWidget(view);
var beforeElement = null;
if (insertBefore) {
- var beforeContainer = insertBefore[WebInspector.ViewManager._ExpandableContainerWidget._symbol];
+ var beforeContainer = insertBefore[UI.ViewManager._ExpandableContainerWidget._symbol];
beforeElement = beforeContainer ? beforeContainer.element : null;
}
container.show(this._vbox.contentElement, beforeElement);
@@ -832,8 +832,8 @@ WebInspector.ViewManager._StackLocation = class extends WebInspector.ViewManager
/**
* @override
- * @param {!WebInspector.View} view
- * @param {?WebInspector.View=} insertBefore
+ * @param {!UI.View} view
+ * @param {?UI.View=} insertBefore
* @return {!Promise}
*/
showView(view, insertBefore) {
@@ -843,7 +843,7 @@ WebInspector.ViewManager._StackLocation = class extends WebInspector.ViewManager
}
/**
- * @param {!WebInspector.View} view
+ * @param {!UI.View} view
* @override
*/
removeView(view) {
@@ -853,7 +853,7 @@ WebInspector.ViewManager._StackLocation = class extends WebInspector.ViewManager
container.detach();
this._expandableContainers.delete(view.viewId());
- delete view[WebInspector.ViewManager._Location.symbol];
+ delete view[UI.ViewManager._Location.symbol];
this._manager._views.delete(view.viewId());
}
@@ -868,6 +868,6 @@ WebInspector.ViewManager._StackLocation = class extends WebInspector.ViewManager
};
/**
- * @type {!WebInspector.ViewManager}
+ * @type {!UI.ViewManager}
*/
-WebInspector.viewManager;
+UI.viewManager;

Powered by Google App Engine
This is Rietveld 408576698