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

Unified Diff: third_party/WebKit/Source/devtools/front_end/console/ConsoleView.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/console/ConsoleView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js b/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js
index 62f9f08056410753e7ea290c147a905a6a87aab6..079e1e62d7c91ec15e249e59ced8141a48fe5922 100644
--- a/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js
+++ b/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js
@@ -27,53 +27,53 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/**
- * @implements {WebInspector.Searchable}
- * @implements {WebInspector.TargetManager.Observer}
- * @implements {WebInspector.ViewportControl.Provider}
+ * @implements {UI.Searchable}
+ * @implements {SDK.TargetManager.Observer}
+ * @implements {UI.ViewportControl.Provider}
* @unrestricted
*/
-WebInspector.ConsoleView = class extends WebInspector.VBox {
+Console.ConsoleView = class extends UI.VBox {
constructor() {
super();
this.setMinimumSize(0, 35);
this.registerRequiredCSS('console/consoleView.css');
- this._searchableView = new WebInspector.SearchableView(this);
- this._searchableView.setPlaceholder(WebInspector.UIString('Find string in logs'));
+ this._searchableView = new UI.SearchableView(this);
+ this._searchableView.setPlaceholder(Common.UIString('Find string in logs'));
this._searchableView.setMinimalSearchQuerySize(0);
this._searchableView.show(this.element);
this._contentsElement = this._searchableView.element;
this._contentsElement.classList.add('console-view');
- /** @type {!Array.<!WebInspector.ConsoleViewMessage>} */
+ /** @type {!Array.<!Console.ConsoleViewMessage>} */
this._visibleViewMessages = [];
this._urlToMessageCount = {};
this._hiddenByFilterCount = 0;
/**
- * @type {!Array.<!WebInspector.ConsoleView.RegexMatchRange>}
+ * @type {!Array.<!Console.ConsoleView.RegexMatchRange>}
*/
this._regexMatchRanges = [];
- this._executionContextComboBox = new WebInspector.ToolbarComboBox(null, 'console-context');
+ this._executionContextComboBox = new UI.ToolbarComboBox(null, 'console-context');
this._executionContextComboBox.setMaxWidth(200);
this._consoleContextSelector =
- new WebInspector.ConsoleContextSelector(this._executionContextComboBox.selectElement());
+ new Console.ConsoleContextSelector(this._executionContextComboBox.selectElement());
- this._filter = new WebInspector.ConsoleViewFilter(this);
+ this._filter = new Console.ConsoleViewFilter(this);
this._filter.addEventListener(
- WebInspector.ConsoleViewFilter.Events.FilterChanged, this._updateMessageList.bind(this));
+ Console.ConsoleViewFilter.Events.FilterChanged, this._updateMessageList.bind(this));
- this._filterBar = new WebInspector.FilterBar('consoleView');
+ this._filterBar = new UI.FilterBar('consoleView');
- this._preserveLogCheckbox = new WebInspector.ToolbarCheckbox(
- WebInspector.UIString('Preserve log'), WebInspector.UIString('Do not clear log on page reload / navigation'),
- WebInspector.moduleSetting('preserveConsoleLog'));
- this._progressToolbarItem = new WebInspector.ToolbarItem(createElement('div'));
+ this._preserveLogCheckbox = new UI.ToolbarCheckbox(
+ Common.UIString('Preserve log'), Common.UIString('Do not clear log on page reload / navigation'),
+ Common.moduleSetting('preserveConsoleLog'));
+ this._progressToolbarItem = new UI.ToolbarItem(createElement('div'));
- var toolbar = new WebInspector.Toolbar('', this._contentsElement);
- toolbar.appendToolbarItem(WebInspector.Toolbar.createActionButton(
- /** @type {!WebInspector.Action }*/ (WebInspector.actionRegistry.action('console.clear'))));
+ var toolbar = new UI.Toolbar('', this._contentsElement);
+ toolbar.appendToolbarItem(UI.Toolbar.createActionButton(
+ /** @type {!UI.Action }*/ (UI.actionRegistry.action('console.clear'))));
toolbar.appendToolbarItem(this._filterBar.filterButton());
toolbar.appendToolbarItem(this._executionContextComboBox);
toolbar.appendToolbarItem(this._preserveLogCheckbox);
@@ -82,7 +82,7 @@ WebInspector.ConsoleView = class extends WebInspector.VBox {
this._filterBar.show(this._contentsElement);
this._filter.addFilters(this._filterBar);
- this._viewport = new WebInspector.ViewportControl(this);
+ this._viewport = new UI.ViewportControl(this);
this._viewport.setStickToBottom(true);
this._viewport.contentElement().classList.add('console-group', 'console-group-messages');
this._contentsElement.appendChild(this._viewport.element);
@@ -91,17 +91,17 @@ WebInspector.ConsoleView = class extends WebInspector.VBox {
this._messagesElement.classList.add('monospace');
this._messagesElement.addEventListener('click', this._messagesClicked.bind(this), true);
- this._viewportThrottler = new WebInspector.Throttler(50);
+ this._viewportThrottler = new Common.Throttler(50);
this._filterStatusMessageElement = createElementWithClass('div', 'console-message');
this._messagesElement.insertBefore(this._filterStatusMessageElement, this._messagesElement.firstChild);
this._filterStatusTextElement = this._filterStatusMessageElement.createChild('span', 'console-info');
this._filterStatusMessageElement.createTextChild(' ');
var resetFiltersLink = this._filterStatusMessageElement.createChild('span', 'console-info link');
- resetFiltersLink.textContent = WebInspector.UIString('Show all messages.');
+ resetFiltersLink.textContent = Common.UIString('Show all messages.');
resetFiltersLink.addEventListener('click', this._filter.reset.bind(this._filter), true);
- this._topGroup = WebInspector.ConsoleGroup.createTopGroup();
+ this._topGroup = Console.ConsoleGroup.createTopGroup();
this._currentGroup = this._topGroup;
this._promptElement = this._messagesElement.createChild('div', 'source-code');
@@ -112,7 +112,7 @@ WebInspector.ConsoleView = class extends WebInspector.VBox {
var selectAllFixer = this._messagesElement.createChild('div', 'console-view-fix-select-all');
selectAllFixer.textContent = '.';
- this._showAllMessagesCheckbox = new WebInspector.ToolbarCheckbox(WebInspector.UIString('Show all messages'));
+ this._showAllMessagesCheckbox = new UI.ToolbarCheckbox(Common.UIString('Show all messages'));
this._showAllMessagesCheckbox.inputElement.checked = true;
this._showAllMessagesCheckbox.inputElement.addEventListener('change', this._updateMessageList.bind(this), false);
@@ -123,22 +123,22 @@ WebInspector.ConsoleView = class extends WebInspector.VBox {
this._registerShortcuts();
this._messagesElement.addEventListener('contextmenu', this._handleContextMenuEvent.bind(this), false);
- WebInspector.moduleSetting('monitoringXHREnabled')
+ Common.moduleSetting('monitoringXHREnabled')
.addChangeListener(this._monitoringXHREnabledSettingChanged, this);
- this._linkifier = new WebInspector.Linkifier();
+ this._linkifier = new Components.Linkifier();
- /** @type {!Array.<!WebInspector.ConsoleViewMessage>} */
+ /** @type {!Array.<!Console.ConsoleViewMessage>} */
this._consoleMessages = [];
this._viewMessageSymbol = Symbol('viewMessage');
- this._consoleHistorySetting = WebInspector.settings.createLocalSetting('consoleHistory', []);
+ this._consoleHistorySetting = Common.settings.createLocalSetting('consoleHistory', []);
- this._prompt = new WebInspector.ConsolePrompt();
+ this._prompt = new Console.ConsolePrompt();
this._prompt.show(this._promptElement);
this._prompt.element.addEventListener('keydown', this._promptKeyDown.bind(this), true);
- this._consoleHistoryAutocompleteSetting = WebInspector.moduleSetting('consoleHistoryAutocomplete');
+ this._consoleHistoryAutocompleteSetting = Common.moduleSetting('consoleHistoryAutocomplete');
this._consoleHistoryAutocompleteSetting.addChangeListener(this._consoleHistoryAutocompleteChanged, this);
var historyData = this._consoleHistorySetting.get();
@@ -146,15 +146,15 @@ WebInspector.ConsoleView = class extends WebInspector.VBox {
this._consoleHistoryAutocompleteChanged();
this._updateFilterStatus();
- WebInspector.moduleSetting('consoleTimestampsEnabled')
+ Common.moduleSetting('consoleTimestampsEnabled')
.addChangeListener(this._consoleTimestampsSettingChanged, this);
this._registerWithMessageSink();
- WebInspector.targetManager.observeTargets(this);
+ SDK.targetManager.observeTargets(this);
this._initConsoleMessages();
- WebInspector.context.addFlavorChangeListener(WebInspector.ExecutionContext, this._executionContextChanged, this);
+ UI.context.addFlavorChangeListener(SDK.ExecutionContext, this._executionContextChanged, this);
this._messagesElement.addEventListener('mousedown', this._updateStickToBottomOnMouseDown.bind(this), false);
this._messagesElement.addEventListener('mouseup', this._updateStickToBottomOnMouseUp.bind(this), false);
@@ -163,23 +163,23 @@ WebInspector.ConsoleView = class extends WebInspector.VBox {
}
/**
- * @return {!WebInspector.ConsoleView}
+ * @return {!Console.ConsoleView}
*/
static instance() {
- if (!WebInspector.ConsoleView._instance)
- WebInspector.ConsoleView._instance = new WebInspector.ConsoleView();
- return WebInspector.ConsoleView._instance;
+ if (!Console.ConsoleView._instance)
+ Console.ConsoleView._instance = new Console.ConsoleView();
+ return Console.ConsoleView._instance;
}
static clearConsole() {
- for (var target of WebInspector.targetManager.targets()) {
+ for (var target of SDK.targetManager.targets()) {
target.runtimeModel.discardConsoleEntries();
target.consoleModel.requestClearMessages();
}
}
/**
- * @return {!WebInspector.SearchableView}
+ * @return {!UI.SearchableView}
*/
searchableView() {
return this._searchableView;
@@ -195,12 +195,12 @@ WebInspector.ConsoleView = class extends WebInspector.VBox {
}
_initConsoleMessages() {
- var mainTarget = WebInspector.targetManager.mainTarget();
- var resourceTreeModel = mainTarget && WebInspector.ResourceTreeModel.fromTarget(mainTarget);
+ var mainTarget = SDK.targetManager.mainTarget();
+ var resourceTreeModel = mainTarget && SDK.ResourceTreeModel.fromTarget(mainTarget);
var resourcesLoaded = !resourceTreeModel || resourceTreeModel.cachedResourcesLoaded();
if (!mainTarget || !resourcesLoaded) {
- WebInspector.targetManager.addModelListener(
- WebInspector.ResourceTreeModel, WebInspector.ResourceTreeModel.Events.CachedResourcesLoaded,
+ SDK.targetManager.addModelListener(
+ SDK.ResourceTreeModel, SDK.ResourceTreeModel.Events.CachedResourcesLoaded,
this._onResourceTreeModelLoaded, this);
return;
}
@@ -208,28 +208,28 @@ WebInspector.ConsoleView = class extends WebInspector.VBox {
}
/**
- * @param {!WebInspector.Event} event
+ * @param {!Common.Event} event
*/
_onResourceTreeModelLoaded(event) {
var resourceTreeModel = event.target;
- if (resourceTreeModel.target() !== WebInspector.targetManager.mainTarget())
+ if (resourceTreeModel.target() !== SDK.targetManager.mainTarget())
return;
- WebInspector.targetManager.removeModelListener(
- WebInspector.ResourceTreeModel, WebInspector.ResourceTreeModel.Events.CachedResourcesLoaded,
+ SDK.targetManager.removeModelListener(
+ SDK.ResourceTreeModel, SDK.ResourceTreeModel.Events.CachedResourcesLoaded,
this._onResourceTreeModelLoaded, this);
this._fetchMultitargetMessages();
}
_fetchMultitargetMessages() {
- WebInspector.multitargetConsoleModel.addEventListener(
- WebInspector.ConsoleModel.Events.ConsoleCleared, this._consoleCleared, this);
- WebInspector.multitargetConsoleModel.addEventListener(
- WebInspector.ConsoleModel.Events.MessageAdded, this._onConsoleMessageAdded, this);
- WebInspector.multitargetConsoleModel.addEventListener(
- WebInspector.ConsoleModel.Events.MessageUpdated, this._onConsoleMessageUpdated, this);
- WebInspector.multitargetConsoleModel.addEventListener(
- WebInspector.ConsoleModel.Events.CommandEvaluated, this._commandEvaluated, this);
- WebInspector.multitargetConsoleModel.messages().forEach(this._addConsoleMessage, this);
+ SDK.multitargetConsoleModel.addEventListener(
+ SDK.ConsoleModel.Events.ConsoleCleared, this._consoleCleared, this);
+ SDK.multitargetConsoleModel.addEventListener(
+ SDK.ConsoleModel.Events.MessageAdded, this._onConsoleMessageAdded, this);
+ SDK.multitargetConsoleModel.addEventListener(
+ SDK.ConsoleModel.Events.MessageUpdated, this._onConsoleMessageUpdated, this);
+ SDK.multitargetConsoleModel.addEventListener(
+ SDK.ConsoleModel.Events.CommandEvaluated, this._commandEvaluated, this);
+ SDK.multitargetConsoleModel.messages().forEach(this._addConsoleMessage, this);
this._viewport.invalidate();
}
@@ -244,7 +244,7 @@ WebInspector.ConsoleView = class extends WebInspector.VBox {
/**
* @override
* @param {number} index
- * @return {?WebInspector.ViewportElement}
+ * @return {?UI.ViewportElement}
*/
itemElement(index) {
return this._visibleViewMessages[index];
@@ -269,7 +269,7 @@ WebInspector.ConsoleView = class extends WebInspector.VBox {
/**
* @override
- * @param {!WebInspector.Target} target
+ * @param {!SDK.Target} target
*/
targetAdded(target) {
this._viewport.invalidate();
@@ -278,52 +278,52 @@ WebInspector.ConsoleView = class extends WebInspector.VBox {
/**
* @override
- * @param {!WebInspector.Target} target
+ * @param {!SDK.Target} target
*/
targetRemoved(target) {
this._updateAllMessagesCheckbox();
}
_updateAllMessagesCheckbox() {
- var hasMultipleCotexts = WebInspector.targetManager.targets(WebInspector.Target.Capability.JS).length > 1;
+ var hasMultipleCotexts = SDK.targetManager.targets(SDK.Target.Capability.JS).length > 1;
this._showAllMessagesCheckbox.element.classList.toggle('hidden', !hasMultipleCotexts);
}
_registerWithMessageSink() {
- WebInspector.console.messages().forEach(this._addSinkMessage, this);
- WebInspector.console.addEventListener(WebInspector.Console.Events.MessageAdded, messageAdded, this);
+ Common.console.messages().forEach(this._addSinkMessage, this);
+ Common.console.addEventListener(Common.Console.Events.MessageAdded, messageAdded, this);
/**
- * @param {!WebInspector.Event} event
- * @this {WebInspector.ConsoleView}
+ * @param {!Common.Event} event
+ * @this {Console.ConsoleView}
*/
function messageAdded(event) {
- this._addSinkMessage(/** @type {!WebInspector.Console.Message} */ (event.data));
+ this._addSinkMessage(/** @type {!Common.Console.Message} */ (event.data));
}
}
/**
- * @param {!WebInspector.Console.Message} message
+ * @param {!Common.Console.Message} message
*/
_addSinkMessage(message) {
- var level = WebInspector.ConsoleMessage.MessageLevel.Debug;
+ var level = SDK.ConsoleMessage.MessageLevel.Debug;
switch (message.level) {
- case WebInspector.Console.MessageLevel.Error:
- level = WebInspector.ConsoleMessage.MessageLevel.Error;
+ case Common.Console.MessageLevel.Error:
+ level = SDK.ConsoleMessage.MessageLevel.Error;
break;
- case WebInspector.Console.MessageLevel.Warning:
- level = WebInspector.ConsoleMessage.MessageLevel.Warning;
+ case Common.Console.MessageLevel.Warning:
+ level = SDK.ConsoleMessage.MessageLevel.Warning;
break;
}
- var consoleMessage = new WebInspector.ConsoleMessage(
- null, WebInspector.ConsoleMessage.MessageSource.Other, level, message.text, undefined, undefined, undefined,
+ var consoleMessage = new SDK.ConsoleMessage(
+ null, SDK.ConsoleMessage.MessageSource.Other, level, message.text, undefined, undefined, undefined,
undefined, undefined, undefined, undefined, message.timestamp);
this._addConsoleMessage(consoleMessage);
}
/**
- * @param {!WebInspector.Event} event
+ * @param {!Common.Event} event
*/
_consoleTimestampsSettingChanged(event) {
var enabled = /** @type {boolean} */ (event.data);
@@ -393,7 +393,7 @@ WebInspector.ConsoleView = class extends WebInspector.VBox {
_scheduleViewportRefresh() {
/**
- * @this {WebInspector.ConsoleView}
+ * @this {Console.ConsoleView}
* @return {!Promise.<undefined>}
*/
function invalidateViewport() {
@@ -433,36 +433,36 @@ WebInspector.ConsoleView = class extends WebInspector.VBox {
}
_updateFilterStatus() {
- this._filterStatusTextElement.textContent = WebInspector.UIString(
+ this._filterStatusTextElement.textContent = Common.UIString(
this._hiddenByFilterCount === 1 ? '%d message is hidden by filters.' : '%d messages are hidden by filters.',
this._hiddenByFilterCount);
this._filterStatusMessageElement.style.display = this._hiddenByFilterCount ? '' : 'none';
}
/**
- * @param {!WebInspector.Event} event
+ * @param {!Common.Event} event
*/
_onConsoleMessageAdded(event) {
- var message = /** @type {!WebInspector.ConsoleMessage} */ (event.data);
+ var message = /** @type {!SDK.ConsoleMessage} */ (event.data);
this._addConsoleMessage(message);
}
/**
- * @param {!WebInspector.ConsoleMessage} message
+ * @param {!SDK.ConsoleMessage} message
*/
_addConsoleMessage(message) {
/**
- * @param {!WebInspector.ConsoleViewMessage} viewMessage1
- * @param {!WebInspector.ConsoleViewMessage} viewMessage2
+ * @param {!Console.ConsoleViewMessage} viewMessage1
+ * @param {!Console.ConsoleViewMessage} viewMessage2
* @return {number}
*/
function compareTimestamps(viewMessage1, viewMessage2) {
- return WebInspector.ConsoleMessage.timestampComparator(
+ return SDK.ConsoleMessage.timestampComparator(
viewMessage1.consoleMessage(), viewMessage2.consoleMessage());
}
- if (message.type === WebInspector.ConsoleMessage.MessageType.Command ||
- message.type === WebInspector.ConsoleMessage.MessageType.Result)
+ if (message.type === SDK.ConsoleMessage.MessageType.Command ||
+ message.type === SDK.ConsoleMessage.MessageType.Result)
message.timestamp =
this._consoleMessages.length ? this._consoleMessages.peekLast().consoleMessage().timestamp : 0;
var viewMessage = this._createViewMessage(message);
@@ -489,10 +489,10 @@ WebInspector.ConsoleView = class extends WebInspector.VBox {
}
/**
- * @param {!WebInspector.Event} event
+ * @param {!Common.Event} event
*/
_onConsoleMessageUpdated(event) {
- var message = /** @type {!WebInspector.ConsoleMessage} */ (event.data);
+ var message = /** @type {!SDK.ConsoleMessage} */ (event.data);
var viewMessage = message[this._viewMessageSymbol];
if (viewMessage) {
viewMessage.updateMessageElement();
@@ -501,13 +501,13 @@ WebInspector.ConsoleView = class extends WebInspector.VBox {
}
/**
- * @param {!WebInspector.ConsoleViewMessage} viewMessage
+ * @param {!Console.ConsoleViewMessage} viewMessage
*/
_consoleMessageAddedForTest(viewMessage) {
}
/**
- * @param {!WebInspector.ConsoleViewMessage} viewMessage
+ * @param {!Console.ConsoleViewMessage} viewMessage
*/
_appendMessageToEnd(viewMessage) {
if (!this._filter.shouldBeVisible(viewMessage)) {
@@ -520,7 +520,7 @@ WebInspector.ConsoleView = class extends WebInspector.VBox {
return;
var lastMessage = this._visibleViewMessages.peekLast();
- if (viewMessage.consoleMessage().type === WebInspector.ConsoleMessage.MessageType.EndGroup) {
+ if (viewMessage.consoleMessage().type === SDK.ConsoleMessage.MessageType.EndGroup) {
if (lastMessage && !this._currentGroup.messagesHidden())
lastMessage.incrementCloseGroupDecorationCount();
this._currentGroup = this._currentGroup.parentGroup();
@@ -536,7 +536,7 @@ WebInspector.ConsoleView = class extends WebInspector.VBox {
}
if (viewMessage.consoleMessage().isGroupStartMessage())
- this._currentGroup = new WebInspector.ConsoleGroup(this._currentGroup, viewMessage);
+ this._currentGroup = new Console.ConsoleGroup(this._currentGroup, viewMessage);
this._messageAppendedForTests();
}
@@ -546,21 +546,21 @@ WebInspector.ConsoleView = class extends WebInspector.VBox {
}
/**
- * @param {!WebInspector.ConsoleMessage} message
- * @return {!WebInspector.ConsoleViewMessage}
+ * @param {!SDK.ConsoleMessage} message
+ * @return {!Console.ConsoleViewMessage}
*/
_createViewMessage(message) {
var nestingLevel = this._currentGroup.nestingLevel();
switch (message.type) {
- case WebInspector.ConsoleMessage.MessageType.Command:
- return new WebInspector.ConsoleCommand(message, this._linkifier, nestingLevel);
- case WebInspector.ConsoleMessage.MessageType.Result:
- return new WebInspector.ConsoleCommandResult(message, this._linkifier, nestingLevel);
- case WebInspector.ConsoleMessage.MessageType.StartGroupCollapsed:
- case WebInspector.ConsoleMessage.MessageType.StartGroup:
- return new WebInspector.ConsoleGroupViewMessage(message, this._linkifier, nestingLevel);
+ case SDK.ConsoleMessage.MessageType.Command:
+ return new Console.ConsoleCommand(message, this._linkifier, nestingLevel);
+ case SDK.ConsoleMessage.MessageType.Result:
+ return new Console.ConsoleCommandResult(message, this._linkifier, nestingLevel);
+ case SDK.ConsoleMessage.MessageType.StartGroupCollapsed:
+ case SDK.ConsoleMessage.MessageType.StartGroup:
+ return new Console.ConsoleGroupViewMessage(message, this._linkifier, nestingLevel);
default:
- return new WebInspector.ConsoleViewMessage(message, this._linkifier, nestingLevel);
+ return new Console.ConsoleViewMessage(message, this._linkifier, nestingLevel);
}
}
@@ -577,40 +577,40 @@ WebInspector.ConsoleView = class extends WebInspector.VBox {
if (event.target.enclosingNodeOrSelfWithNodeName('a'))
return;
- var contextMenu = new WebInspector.ContextMenu(event);
+ var contextMenu = new UI.ContextMenu(event);
if (event.target.isSelfOrDescendant(this._promptElement)) {
contextMenu.show();
return;
}
function monitoringXHRItemAction() {
- WebInspector.moduleSetting('monitoringXHREnabled').set(!WebInspector.moduleSetting('monitoringXHREnabled').get());
+ Common.moduleSetting('monitoringXHREnabled').set(!Common.moduleSetting('monitoringXHREnabled').get());
}
contextMenu.appendCheckboxItem(
- WebInspector.UIString('Log XMLHttpRequests'), monitoringXHRItemAction,
- WebInspector.moduleSetting('monitoringXHREnabled').get());
+ Common.UIString('Log XMLHttpRequests'), monitoringXHRItemAction,
+ Common.moduleSetting('monitoringXHREnabled').get());
var sourceElement = event.target.enclosingNodeOrSelfWithClass('console-message-wrapper');
var consoleMessage = sourceElement ? sourceElement.message.consoleMessage() : null;
- var filterSubMenu = contextMenu.appendSubMenuItem(WebInspector.UIString('Filter'));
+ var filterSubMenu = contextMenu.appendSubMenuItem(Common.UIString('Filter'));
if (consoleMessage && consoleMessage.url) {
- var menuTitle = WebInspector.UIString.capitalize(
- 'Hide ^messages from %s', new WebInspector.ParsedURL(consoleMessage.url).displayName);
+ var menuTitle = Common.UIString.capitalize(
+ 'Hide ^messages from %s', new Common.ParsedURL(consoleMessage.url).displayName);
filterSubMenu.appendItem(menuTitle, this._filter.addMessageURLFilter.bind(this._filter, consoleMessage.url));
}
filterSubMenu.appendSeparator();
var unhideAll = filterSubMenu.appendItem(
- WebInspector.UIString.capitalize('Unhide ^all'), this._filter.removeMessageURLFilter.bind(this._filter));
+ Common.UIString.capitalize('Unhide ^all'), this._filter.removeMessageURLFilter.bind(this._filter));
filterSubMenu.appendSeparator();
var hasFilters = false;
for (var url in this._filter.messageURLFilters) {
filterSubMenu.appendCheckboxItem(
- String.sprintf('%s (%d)', new WebInspector.ParsedURL(url).displayName, this._urlToMessageCount[url]),
+ String.sprintf('%s (%d)', new Common.ParsedURL(url).displayName, this._urlToMessageCount[url]),
this._filter.removeMessageURLFilter.bind(this._filter, url), true);
hasFilters = true;
}
@@ -621,25 +621,25 @@ WebInspector.ConsoleView = class extends WebInspector.VBox {
contextMenu.appendSeparator();
contextMenu.appendAction('console.clear');
contextMenu.appendAction('console.clear.history');
- contextMenu.appendItem(WebInspector.UIString('Save as...'), this._saveConsole.bind(this));
+ contextMenu.appendItem(Common.UIString('Save as...'), this._saveConsole.bind(this));
var request = consoleMessage ? consoleMessage.request : null;
- if (request && request.resourceType() === WebInspector.resourceTypes.XHR) {
+ if (request && request.resourceType() === Common.resourceTypes.XHR) {
contextMenu.appendSeparator();
- contextMenu.appendItem(WebInspector.UIString('Replay XHR'), request.replayXHR.bind(request));
+ contextMenu.appendItem(Common.UIString('Replay XHR'), request.replayXHR.bind(request));
}
contextMenu.show();
}
_saveConsole() {
- var url = WebInspector.targetManager.mainTarget().inspectedURL();
+ var url = SDK.targetManager.mainTarget().inspectedURL();
var parsedURL = url.asParsedURL();
var filename = String.sprintf('%s-%d.log', parsedURL ? parsedURL.host : 'console', Date.now());
- var stream = new WebInspector.FileOutputStream();
+ var stream = new Bindings.FileOutputStream();
- var progressIndicator = new WebInspector.ProgressIndicator();
- progressIndicator.setTitle(WebInspector.UIString('Writing file…'));
+ var progressIndicator = new UI.ProgressIndicator();
+ progressIndicator.setTitle(Common.UIString('Writing file…'));
progressIndicator.setTotalWork(this.itemCount());
/** @const */
@@ -650,7 +650,7 @@ WebInspector.ConsoleView = class extends WebInspector.VBox {
/**
* @param {boolean} accepted
- * @this {WebInspector.ConsoleView}
+ * @this {Console.ConsoleView}
*/
function openCallback(accepted) {
if (!accepted)
@@ -660,9 +660,9 @@ WebInspector.ConsoleView = class extends WebInspector.VBox {
}
/**
- * @param {!WebInspector.OutputStream} stream
+ * @param {!Common.OutputStream} stream
* @param {string=} error
- * @this {WebInspector.ConsoleView}
+ * @this {Console.ConsoleView}
*/
function writeNextChunk(stream, error) {
if (messageIndex >= this.itemCount() || error) {
@@ -684,12 +684,12 @@ WebInspector.ConsoleView = class extends WebInspector.VBox {
}
/**
- * @param {!WebInspector.ConsoleViewMessage} lastMessage
- * @param {?WebInspector.ConsoleViewMessage=} viewMessage
+ * @param {!Console.ConsoleViewMessage} lastMessage
+ * @param {?Console.ConsoleViewMessage=} viewMessage
* @return {boolean}
*/
_tryToCollapseMessages(lastMessage, viewMessage) {
- if (!WebInspector.moduleSetting('consoleTimestampsEnabled').get() && viewMessage &&
+ if (!Common.moduleSetting('consoleTimestampsEnabled').get() && viewMessage &&
!lastMessage.consoleMessage().isGroupMessage() &&
lastMessage.consoleMessage().isEqual(viewMessage.consoleMessage())) {
viewMessage.incrementRepeatCount();
@@ -700,7 +700,7 @@ WebInspector.ConsoleView = class extends WebInspector.VBox {
}
_updateMessageList() {
- this._topGroup = WebInspector.ConsoleGroup.createTopGroup();
+ this._topGroup = Console.ConsoleGroup.createTopGroup();
this._currentGroup = this._topGroup;
this._regexMatchRanges = [];
this._hiddenByFilterCount = 0;
@@ -717,11 +717,11 @@ WebInspector.ConsoleView = class extends WebInspector.VBox {
}
/**
- * @param {!WebInspector.Event} event
+ * @param {!Common.Event} event
*/
_monitoringXHREnabledSettingChanged(event) {
var enabled = /** @type {boolean} */ (event.data);
- WebInspector.targetManager.targets().forEach(function(target) {
+ SDK.targetManager.targets().forEach(function(target) {
target.networkAgent().setMonitoringXHREnabled(enabled);
});
}
@@ -744,37 +744,37 @@ WebInspector.ConsoleView = class extends WebInspector.VBox {
_registerShortcuts() {
this._shortcuts = {};
- var shortcut = WebInspector.KeyboardShortcut;
- var section = WebInspector.shortcutsScreen.section(WebInspector.UIString('Console'));
+ var shortcut = UI.KeyboardShortcut;
+ var section = Components.shortcutsScreen.section(Common.UIString('Console'));
- var shortcutL = shortcut.makeDescriptor('l', WebInspector.KeyboardShortcut.Modifiers.Ctrl);
+ var shortcutL = shortcut.makeDescriptor('l', UI.KeyboardShortcut.Modifiers.Ctrl);
var keys = [shortcutL];
- if (WebInspector.isMac()) {
- var shortcutK = shortcut.makeDescriptor('k', WebInspector.KeyboardShortcut.Modifiers.Meta);
+ if (Host.isMac()) {
+ var shortcutK = shortcut.makeDescriptor('k', UI.KeyboardShortcut.Modifiers.Meta);
keys.unshift(shortcutK);
}
- section.addAlternateKeys(keys, WebInspector.UIString('Clear console'));
+ section.addAlternateKeys(keys, Common.UIString('Clear console'));
keys = [
shortcut.makeDescriptor(shortcut.Keys.Tab),
shortcut.makeDescriptor(shortcut.Keys.Right)
];
- section.addRelatedKeys(keys, WebInspector.UIString('Accept suggestion'));
+ section.addRelatedKeys(keys, Common.UIString('Accept suggestion'));
- var shortcutU = shortcut.makeDescriptor('u', WebInspector.KeyboardShortcut.Modifiers.Ctrl);
+ var shortcutU = shortcut.makeDescriptor('u', UI.KeyboardShortcut.Modifiers.Ctrl);
this._shortcuts[shortcutU.key] = this._clearPromptBackwards.bind(this);
- section.addAlternateKeys([shortcutU], WebInspector.UIString('Clear console prompt'));
+ section.addAlternateKeys([shortcutU], Common.UIString('Clear console prompt'));
keys = [shortcut.makeDescriptor(shortcut.Keys.Down), shortcut.makeDescriptor(shortcut.Keys.Up)];
- section.addRelatedKeys(keys, WebInspector.UIString('Next/previous line'));
+ section.addRelatedKeys(keys, Common.UIString('Next/previous line'));
- if (WebInspector.isMac()) {
+ if (Host.isMac()) {
keys =
[shortcut.makeDescriptor('N', shortcut.Modifiers.Alt), shortcut.makeDescriptor('P', shortcut.Modifiers.Alt)];
- section.addRelatedKeys(keys, WebInspector.UIString('Next/previous command'));
+ section.addRelatedKeys(keys, Common.UIString('Next/previous command'));
}
- section.addKey(shortcut.makeDescriptor(shortcut.Keys.Enter), WebInspector.UIString('Execute command'));
+ section.addKey(shortcut.makeDescriptor(shortcut.Keys.Enter), Common.UIString('Execute command'));
}
_clearPromptBackwards() {
@@ -791,7 +791,7 @@ WebInspector.ConsoleView = class extends WebInspector.VBox {
return;
}
- var shortcut = WebInspector.KeyboardShortcut.makeKeyFromEvent(keyboardEvent);
+ var shortcut = UI.KeyboardShortcut.makeKeyFromEvent(keyboardEvent);
var handler = this._shortcuts[shortcut];
if (handler) {
handler();
@@ -800,38 +800,38 @@ WebInspector.ConsoleView = class extends WebInspector.VBox {
}
/**
- * @param {?WebInspector.RemoteObject} result
- * @param {!WebInspector.ConsoleMessage} originatingConsoleMessage
+ * @param {?SDK.RemoteObject} result
+ * @param {!SDK.ConsoleMessage} originatingConsoleMessage
* @param {!Protocol.Runtime.ExceptionDetails=} exceptionDetails
*/
_printResult(result, originatingConsoleMessage, exceptionDetails) {
if (!result)
return;
- var level = !!exceptionDetails ? WebInspector.ConsoleMessage.MessageLevel.Error :
- WebInspector.ConsoleMessage.MessageLevel.Log;
+ var level = !!exceptionDetails ? SDK.ConsoleMessage.MessageLevel.Error :
+ SDK.ConsoleMessage.MessageLevel.Log;
var message;
if (!exceptionDetails)
- message = new WebInspector.ConsoleMessage(
- result.target(), WebInspector.ConsoleMessage.MessageSource.JS, level, '',
- WebInspector.ConsoleMessage.MessageType.Result, undefined, undefined, undefined, undefined, [result]);
+ message = new SDK.ConsoleMessage(
+ result.target(), SDK.ConsoleMessage.MessageSource.JS, level, '',
+ SDK.ConsoleMessage.MessageType.Result, undefined, undefined, undefined, undefined, [result]);
else
- message = WebInspector.ConsoleMessage.fromException(
- result.target(), exceptionDetails, WebInspector.ConsoleMessage.MessageType.Result, undefined, undefined);
+ message = SDK.ConsoleMessage.fromException(
+ result.target(), exceptionDetails, SDK.ConsoleMessage.MessageType.Result, undefined, undefined);
message.setOriginatingMessage(originatingConsoleMessage);
result.target().consoleModel.addMessage(message);
}
/**
- * @param {!WebInspector.Event} event
+ * @param {!Common.Event} event
*/
_commandEvaluated(event) {
var data =
- /** @type {{result: ?WebInspector.RemoteObject, text: string, commandMessage: !WebInspector.ConsoleMessage, exceptionDetails: (!Protocol.Runtime.ExceptionDetails|undefined)}} */
+ /** @type {{result: ?SDK.RemoteObject, text: string, commandMessage: !SDK.ConsoleMessage, exceptionDetails: (!Protocol.Runtime.ExceptionDetails|undefined)}} */
(event.data);
this._prompt.history().pushHistoryItem(data.text);
this._consoleHistorySetting.set(
- this._prompt.history().historyData().slice(-WebInspector.ConsoleView.persistedHistorySize));
+ this._prompt.history().historyData().slice(-Console.ConsoleView.persistedHistorySize));
this._printResult(data.result, data.commandMessage, data.exceptionDetails);
}
@@ -860,7 +860,7 @@ WebInspector.ConsoleView = class extends WebInspector.VBox {
/**
* @override
- * @param {!WebInspector.SearchableView.SearchConfig} searchConfig
+ * @param {!UI.SearchableView.SearchConfig} searchConfig
* @param {boolean} shouldJump
* @param {boolean=} jumpBackwards
*/
@@ -876,8 +876,8 @@ WebInspector.ConsoleView = class extends WebInspector.VBox {
if (shouldJump)
this._searchShouldJumpBackwards = !!jumpBackwards;
- this._searchProgressIndicator = new WebInspector.ProgressIndicator();
- this._searchProgressIndicator.setTitle(WebInspector.UIString('Searching…'));
+ this._searchProgressIndicator = new UI.ProgressIndicator();
+ this._searchProgressIndicator.setTitle(Common.UIString('Searching…'));
this._searchProgressIndicator.setTotalWork(this._visibleViewMessages.length);
this._progressToolbarItem.element.appendChild(this._searchProgressIndicator.element);
@@ -983,7 +983,7 @@ WebInspector.ConsoleView = class extends WebInspector.VBox {
matchRange = this._regexMatchRanges[this._currentMatchRangeIndex];
var message = this._visibleViewMessages[matchRange.messageIndex];
message.searchHighlightNode(matchRange.matchIndex)
- .classList.remove(WebInspector.highlightedCurrentSearchResultClassName);
+ .classList.remove(UI.highlightedCurrentSearchResultClassName);
}
index = mod(index, this._regexMatchRanges.length);
@@ -992,7 +992,7 @@ WebInspector.ConsoleView = class extends WebInspector.VBox {
matchRange = this._regexMatchRanges[index];
var message = this._visibleViewMessages[matchRange.messageIndex];
var highlightNode = message.searchHighlightNode(matchRange.matchIndex);
- highlightNode.classList.add(WebInspector.highlightedCurrentSearchResultClassName);
+ highlightNode.classList.add(UI.highlightedCurrentSearchResultClassName);
this._viewport.scrollItemIntoView(matchRange.messageIndex);
highlightNode.scrollIntoViewIfNeeded();
}
@@ -1016,7 +1016,7 @@ WebInspector.ConsoleView = class extends WebInspector.VBox {
this._waitForScrollTimeout = setTimeout(updateViewportState.bind(this), 200);
/**
- * @this {!WebInspector.ConsoleView}
+ * @this {!Console.ConsoleView}
*/
function updateViewportState() {
this._muteViewportUpdates = false;
@@ -1046,51 +1046,51 @@ WebInspector.ConsoleView = class extends WebInspector.VBox {
}
};
-WebInspector.ConsoleView.persistedHistorySize = 300;
+Console.ConsoleView.persistedHistorySize = 300;
/**
* @unrestricted
*/
-WebInspector.ConsoleViewFilter = class extends WebInspector.Object {
+Console.ConsoleViewFilter = class extends Common.Object {
/**
- * @param {!WebInspector.ConsoleView} view
+ * @param {!Console.ConsoleView} view
*/
constructor(view) {
super();
- this._messageURLFiltersSetting = WebInspector.settings.createSetting('messageURLFilters', {});
- this._messageLevelFiltersSetting = WebInspector.settings.createSetting('messageLevelFilters', {});
+ this._messageURLFiltersSetting = Common.settings.createSetting('messageURLFilters', {});
+ this._messageLevelFiltersSetting = Common.settings.createSetting('messageLevelFilters', {});
this._view = view;
this._messageURLFilters = this._messageURLFiltersSetting.get();
- this._filterChanged = this.dispatchEventToListeners.bind(this, WebInspector.ConsoleViewFilter.Events.FilterChanged);
+ this._filterChanged = this.dispatchEventToListeners.bind(this, Console.ConsoleViewFilter.Events.FilterChanged);
}
addFilters(filterBar) {
- this._textFilterUI = new WebInspector.TextFilterUI(true);
- this._textFilterUI.addEventListener(WebInspector.FilterUI.Events.FilterChanged, this._textFilterChanged, this);
+ this._textFilterUI = new UI.TextFilterUI(true);
+ this._textFilterUI.addEventListener(UI.FilterUI.Events.FilterChanged, this._textFilterChanged, this);
filterBar.addFilter(this._textFilterUI);
- this._hideNetworkMessagesCheckbox = new WebInspector.CheckboxFilterUI(
- '', WebInspector.UIString('Hide network'), true,
- WebInspector.moduleSetting('hideNetworkMessages'));
- this._hideViolationMessagesCheckbox = new WebInspector.CheckboxFilterUI(
- '', WebInspector.UIString('Hide violations'), false,
- WebInspector.moduleSetting('hideViolationMessages'));
- WebInspector.moduleSetting('hideNetworkMessages').addChangeListener(this._filterChanged, this);
- WebInspector.moduleSetting('hideViolationMessages').addChangeListener(this._filterChanged, this);
+ this._hideNetworkMessagesCheckbox = new UI.CheckboxFilterUI(
+ '', Common.UIString('Hide network'), true,
+ Common.moduleSetting('hideNetworkMessages'));
+ this._hideViolationMessagesCheckbox = new UI.CheckboxFilterUI(
+ '', Common.UIString('Hide violations'), false,
+ Common.moduleSetting('hideViolationMessages'));
+ Common.moduleSetting('hideNetworkMessages').addChangeListener(this._filterChanged, this);
+ Common.moduleSetting('hideViolationMessages').addChangeListener(this._filterChanged, this);
filterBar.addFilter(this._hideNetworkMessagesCheckbox);
filterBar.addFilter(this._hideViolationMessagesCheckbox);
var levels = [
- {name: WebInspector.ConsoleMessage.MessageLevel.Error, label: WebInspector.UIString('Errors')},
- {name: WebInspector.ConsoleMessage.MessageLevel.Warning, label: WebInspector.UIString('Warnings')},
- {name: WebInspector.ConsoleMessage.MessageLevel.Info, label: WebInspector.UIString('Info')},
- {name: WebInspector.ConsoleMessage.MessageLevel.Log, label: WebInspector.UIString('Logs')},
- {name: WebInspector.ConsoleMessage.MessageLevel.Debug, label: WebInspector.UIString('Debug')},
- {name: WebInspector.ConsoleMessage.MessageLevel.RevokedError, label: WebInspector.UIString('Handled')}
+ {name: SDK.ConsoleMessage.MessageLevel.Error, label: Common.UIString('Errors')},
+ {name: SDK.ConsoleMessage.MessageLevel.Warning, label: Common.UIString('Warnings')},
+ {name: SDK.ConsoleMessage.MessageLevel.Info, label: Common.UIString('Info')},
+ {name: SDK.ConsoleMessage.MessageLevel.Log, label: Common.UIString('Logs')},
+ {name: SDK.ConsoleMessage.MessageLevel.Debug, label: Common.UIString('Debug')},
+ {name: SDK.ConsoleMessage.MessageLevel.RevokedError, label: Common.UIString('Handled')}
];
- this._levelFilterUI = new WebInspector.NamedBitSetFilterUI(levels, this._messageLevelFiltersSetting);
- this._levelFilterUI.addEventListener(WebInspector.FilterUI.Events.FilterChanged, this._filterChanged, this);
+ this._levelFilterUI = new UI.NamedBitSetFilterUI(levels, this._messageLevelFiltersSetting);
+ this._levelFilterUI.addEventListener(UI.FilterUI.Events.FilterChanged, this._filterChanged, this);
filterBar.addFilter(this._levelFilterUI);
}
@@ -1130,12 +1130,12 @@ WebInspector.ConsoleViewFilter = class extends WebInspector.Object {
}
/**
- * @param {!WebInspector.ConsoleViewMessage} viewMessage
+ * @param {!Console.ConsoleViewMessage} viewMessage
* @return {boolean}
*/
shouldBeVisible(viewMessage) {
var message = viewMessage.consoleMessage();
- var executionContext = WebInspector.context.flavor(WebInspector.ExecutionContext);
+ var executionContext = UI.context.flavor(SDK.ExecutionContext);
if (!message.target())
return true;
@@ -1147,19 +1147,19 @@ WebInspector.ConsoleViewFilter = class extends WebInspector.Object {
}
}
- if (WebInspector.moduleSetting('hideNetworkMessages').get() &&
- viewMessage.consoleMessage().source === WebInspector.ConsoleMessage.MessageSource.Network)
+ if (Common.moduleSetting('hideNetworkMessages').get() &&
+ viewMessage.consoleMessage().source === SDK.ConsoleMessage.MessageSource.Network)
return false;
- if (WebInspector.moduleSetting('hideViolationMessages').get() &&
- viewMessage.consoleMessage().source === WebInspector.ConsoleMessage.MessageSource.Violation)
+ if (Common.moduleSetting('hideViolationMessages').get() &&
+ viewMessage.consoleMessage().source === SDK.ConsoleMessage.MessageSource.Violation)
return false;
if (viewMessage.consoleMessage().isGroupMessage())
return true;
- if (message.type === WebInspector.ConsoleMessage.MessageType.Result ||
- message.type === WebInspector.ConsoleMessage.MessageType.Command)
+ if (message.type === SDK.ConsoleMessage.MessageType.Result ||
+ message.type === SDK.ConsoleMessage.MessageType.Command)
return true;
if (message.url && this._messageURLFilters[message.url])
@@ -1182,7 +1182,7 @@ WebInspector.ConsoleViewFilter = class extends WebInspector.Object {
*/
shouldBeVisibleByDefault(viewMessage) {
return viewMessage.consoleMessage().source !==
- WebInspector.ConsoleMessage.MessageSource.Violation;
+ SDK.ConsoleMessage.MessageSource.Violation;
}
reset() {
@@ -1190,25 +1190,25 @@ WebInspector.ConsoleViewFilter = class extends WebInspector.Object {
this._messageURLFiltersSetting.set(this._messageURLFilters);
this._messageLevelFiltersSetting.set({});
this._view._showAllMessagesCheckbox.inputElement.checked = true;
- WebInspector.moduleSetting('hideNetworkMessages').set(false);
- WebInspector.moduleSetting('hideViolationMessages').set(true);
+ Common.moduleSetting('hideNetworkMessages').set(false);
+ Common.moduleSetting('hideViolationMessages').set(true);
this._textFilterUI.setValue('');
this._filterChanged();
}
};
/** @enum {symbol} */
-WebInspector.ConsoleViewFilter.Events = {
+Console.ConsoleViewFilter.Events = {
FilterChanged: Symbol('FilterChanged')
};
/**
* @unrestricted
*/
-WebInspector.ConsoleCommand = class extends WebInspector.ConsoleViewMessage {
+Console.ConsoleCommand = class extends Console.ConsoleViewMessage {
/**
- * @param {!WebInspector.ConsoleMessage} message
- * @param {!WebInspector.Linkifier} linkifier
+ * @param {!SDK.ConsoleMessage} message
+ * @param {!Components.Linkifier} linkifier
* @param {number} nestingLevel
*/
constructor(message, linkifier, nestingLevel) {
@@ -1228,8 +1228,8 @@ WebInspector.ConsoleCommand = class extends WebInspector.ConsoleViewMessage {
this._formattedCommand.textContent = this.text.replaceControlCharacters();
this._contentElement.appendChild(this._formattedCommand);
- if (this._formattedCommand.textContent.length < WebInspector.ConsoleCommand.MaxLengthToIgnoreHighlighter) {
- var javascriptSyntaxHighlighter = new WebInspector.DOMSyntaxHighlighter('text/javascript', true);
+ if (this._formattedCommand.textContent.length < Console.ConsoleCommand.MaxLengthToIgnoreHighlighter) {
+ var javascriptSyntaxHighlighter = new UI.DOMSyntaxHighlighter('text/javascript', true);
javascriptSyntaxHighlighter.syntaxHighlightNode(this._formattedCommand).then(this._updateSearch.bind(this));
} else {
this._updateSearch();
@@ -1248,15 +1248,15 @@ WebInspector.ConsoleCommand = class extends WebInspector.ConsoleViewMessage {
* @const
* @type {number}
*/
-WebInspector.ConsoleCommand.MaxLengthToIgnoreHighlighter = 10000;
+Console.ConsoleCommand.MaxLengthToIgnoreHighlighter = 10000;
/**
* @unrestricted
*/
-WebInspector.ConsoleCommandResult = class extends WebInspector.ConsoleViewMessage {
+Console.ConsoleCommandResult = class extends Console.ConsoleViewMessage {
/**
- * @param {!WebInspector.ConsoleMessage} message
- * @param {!WebInspector.Linkifier} linkifier
+ * @param {!SDK.ConsoleMessage} message
+ * @param {!Components.Linkifier} linkifier
* @param {number} nestingLevel
*/
constructor(message, linkifier, nestingLevel) {
@@ -1278,10 +1278,10 @@ WebInspector.ConsoleCommandResult = class extends WebInspector.ConsoleViewMessag
/**
* @unrestricted
*/
-WebInspector.ConsoleGroup = class {
+Console.ConsoleGroup = class {
/**
- * @param {?WebInspector.ConsoleGroup} parentGroup
- * @param {?WebInspector.ConsoleViewMessage} groupMessage
+ * @param {?Console.ConsoleGroup} parentGroup
+ * @param {?Console.ConsoleViewMessage} groupMessage
*/
constructor(parentGroup, groupMessage) {
this._parentGroup = parentGroup;
@@ -1291,10 +1291,10 @@ WebInspector.ConsoleGroup = class {
}
/**
- * @return {!WebInspector.ConsoleGroup}
+ * @return {!Console.ConsoleGroup}
*/
static createTopGroup() {
- return new WebInspector.ConsoleGroup(null, null);
+ return new Console.ConsoleGroup(null, null);
}
/**
@@ -1312,7 +1312,7 @@ WebInspector.ConsoleGroup = class {
}
/**
- * @return {?WebInspector.ConsoleGroup}
+ * @return {?Console.ConsoleGroup}
*/
parentGroup() {
return this._parentGroup || this;
@@ -1321,26 +1321,26 @@ WebInspector.ConsoleGroup = class {
/**
- * @implements {WebInspector.ActionDelegate}
+ * @implements {UI.ActionDelegate}
* @unrestricted
*/
-WebInspector.ConsoleView.ActionDelegate = class {
+Console.ConsoleView.ActionDelegate = class {
/**
* @override
- * @param {!WebInspector.Context} context
+ * @param {!UI.Context} context
* @param {string} actionId
* @return {boolean}
*/
handleAction(context, actionId) {
switch (actionId) {
case 'console.show':
- WebInspector.console.show();
+ Common.console.show();
return true;
case 'console.clear':
- WebInspector.ConsoleView.clearConsole();
+ Console.ConsoleView.clearConsole();
return true;
case 'console.clear.history':
- WebInspector.ConsoleView.instance()._clearHistory();
+ Console.ConsoleView.instance()._clearHistory();
return true;
}
return false;
@@ -1350,4 +1350,4 @@ WebInspector.ConsoleView.ActionDelegate = class {
/**
* @typedef {{messageIndex: number, matchIndex: number}}
*/
-WebInspector.ConsoleView.RegexMatchRange;
+Console.ConsoleView.RegexMatchRange;

Powered by Google App Engine
This is Rietveld 408576698