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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sources/DebuggerPausedMessage.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/sources/DebuggerPausedMessage.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/DebuggerPausedMessage.js b/third_party/WebKit/Source/devtools/front_end/sources/DebuggerPausedMessage.js
index cb18dbbd8004aa3873b93dfbc24a7d2d5d6d1b75..424115fb18a8f8acbef66fe3adb98ab4a4fcadf0 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/DebuggerPausedMessage.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/DebuggerPausedMessage.js
@@ -4,10 +4,10 @@
/**
* @unrestricted
*/
-WebInspector.DebuggerPausedMessage = class {
+Sources.DebuggerPausedMessage = class {
constructor() {
this._element = createElementWithClass('div', 'paused-message flex-none');
- var root = WebInspector.createShadowRootWithCoreStyles(this._element, 'sources/debuggerPausedMessage.css');
+ var root = UI.createShadowRootWithCoreStyles(this._element, 'sources/debuggerPausedMessage.css');
this._contentElement = root.createChild('div', 'paused-status');
}
@@ -19,9 +19,9 @@ WebInspector.DebuggerPausedMessage = class {
}
/**
- * @param {?WebInspector.DebuggerPausedDetails} details
- * @param {!WebInspector.DebuggerWorkspaceBinding} debuggerWorkspaceBinding
- * @param {!WebInspector.BreakpointManager} breakpointManager
+ * @param {?SDK.DebuggerPausedDetails} details
+ * @param {!Bindings.DebuggerWorkspaceBinding} debuggerWorkspaceBinding
+ * @param {!Bindings.BreakpointManager} breakpointManager
*/
render(details, debuggerWorkspaceBinding, breakpointManager) {
var status = this._contentElement;
@@ -31,43 +31,43 @@ WebInspector.DebuggerPausedMessage = class {
return;
var messageWrapper;
- if (details.reason === WebInspector.DebuggerModel.BreakReason.DOM) {
- messageWrapper = WebInspector.DOMBreakpointsSidebarPane.createBreakpointHitMessage(details);
- } else if (details.reason === WebInspector.DebuggerModel.BreakReason.EventListener) {
+ if (details.reason === SDK.DebuggerModel.BreakReason.DOM) {
+ messageWrapper = Components.DOMBreakpointsSidebarPane.createBreakpointHitMessage(details);
+ } else if (details.reason === SDK.DebuggerModel.BreakReason.EventListener) {
var eventName = details.auxData['eventName'];
- var eventNameForUI = WebInspector.EventListenerBreakpointsSidebarPane.eventNameForUI(eventName, details.auxData);
- messageWrapper = buildWrapper(WebInspector.UIString('Paused on event listener'), eventNameForUI);
- } else if (details.reason === WebInspector.DebuggerModel.BreakReason.XHR) {
- messageWrapper = buildWrapper(WebInspector.UIString('Paused on XMLHttpRequest'), details.auxData['url'] || '');
- } else if (details.reason === WebInspector.DebuggerModel.BreakReason.Exception) {
+ var eventNameForUI = Sources.EventListenerBreakpointsSidebarPane.eventNameForUI(eventName, details.auxData);
+ messageWrapper = buildWrapper(Common.UIString('Paused on event listener'), eventNameForUI);
+ } else if (details.reason === SDK.DebuggerModel.BreakReason.XHR) {
+ messageWrapper = buildWrapper(Common.UIString('Paused on XMLHttpRequest'), details.auxData['url'] || '');
+ } else if (details.reason === SDK.DebuggerModel.BreakReason.Exception) {
var description = details.auxData['description'] || details.auxData['value'] || '';
var descriptionFirstLine = description.split('\n', 1)[0];
- messageWrapper = buildWrapper(WebInspector.UIString('Paused on exception'), descriptionFirstLine, description);
- } else if (details.reason === WebInspector.DebuggerModel.BreakReason.PromiseRejection) {
+ messageWrapper = buildWrapper(Common.UIString('Paused on exception'), descriptionFirstLine, description);
+ } else if (details.reason === SDK.DebuggerModel.BreakReason.PromiseRejection) {
var description = details.auxData['description'] || details.auxData['value'] || '';
var descriptionFirstLine = description.split('\n', 1)[0];
messageWrapper =
- buildWrapper(WebInspector.UIString('Paused on promise rejection'), descriptionFirstLine, description);
- } else if (details.reason === WebInspector.DebuggerModel.BreakReason.Assert) {
- messageWrapper = buildWrapper(WebInspector.UIString('Paused on assertion'));
- } else if (details.reason === WebInspector.DebuggerModel.BreakReason.DebugCommand) {
- messageWrapper = buildWrapper(WebInspector.UIString('Paused on debugged function'));
+ buildWrapper(Common.UIString('Paused on promise rejection'), descriptionFirstLine, description);
+ } else if (details.reason === SDK.DebuggerModel.BreakReason.Assert) {
+ messageWrapper = buildWrapper(Common.UIString('Paused on assertion'));
+ } else if (details.reason === SDK.DebuggerModel.BreakReason.DebugCommand) {
+ messageWrapper = buildWrapper(Common.UIString('Paused on debugged function'));
} else if (details.callFrames.length) {
var uiLocation = debuggerWorkspaceBinding.rawLocationToUILocation(details.callFrames[0].location());
var breakpoint =
uiLocation ? breakpointManager.findBreakpoint(
uiLocation.uiSourceCode, uiLocation.lineNumber, uiLocation.columnNumber) : null;
var defaultText =
- breakpoint ? WebInspector.UIString('Paused on breakpoint') : WebInspector.UIString('Debugger paused');
+ breakpoint ? Common.UIString('Paused on breakpoint') : Common.UIString('Debugger paused');
messageWrapper = buildWrapper(defaultText);
} else {
console.warn(
'ScriptsPanel paused, but callFrames.length is zero.'); // TODO remove this once we understand this case better
}
- var errorLike = details.reason === WebInspector.DebuggerModel.BreakReason.Exception ||
- details.reason === WebInspector.DebuggerModel.BreakReason.PromiseRejection ||
- details.reason === WebInspector.DebuggerModel.BreakReason.Assert;
+ var errorLike = details.reason === SDK.DebuggerModel.BreakReason.Exception ||
+ details.reason === SDK.DebuggerModel.BreakReason.PromiseRejection ||
+ details.reason === SDK.DebuggerModel.BreakReason.Assert;
status.classList.toggle('error-reason', errorLike);
if (messageWrapper)
status.appendChild(messageWrapper);
@@ -81,7 +81,7 @@ WebInspector.DebuggerPausedMessage = class {
function buildWrapper(mainText, subText, title) {
var messageWrapper = createElement('span');
var mainElement = messageWrapper.createChild('div', 'status-main');
- mainElement.appendChild(WebInspector.Icon.create('smallicon-info', 'status-icon'));
+ mainElement.appendChild(UI.Icon.create('smallicon-info', 'status-icon'));
mainElement.appendChild(createTextNode(mainText));
if (subText) {
var subElement = messageWrapper.createChild('div', 'status-sub monospace');

Powered by Google App Engine
This is Rietveld 408576698