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

Unified Diff: third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js

Issue 2514323008: DevTools: move message management from UISourceCodeFrame to UISourceCode (Closed)
Patch Set: address comments 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
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/sources/UISourceCodeFrame.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js
diff --git a/third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js b/third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js
index d105466f9c1f06d68e59203c38fbf26db2ec7985..176fa8e392a8fd2bf4973c73e246760e6cdca61d 100644
--- a/third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js
+++ b/third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js
@@ -439,7 +439,7 @@ Workspace.UISourceCode = class extends Common.Object {
resetWorkingCopy() {
this._innerResetWorkingCopy();
- this.dispatchEventToListeners(Workspace.UISourceCode.Events.WorkingCopyChanged);
+ this._workingCopyChanged();
}
_innerResetWorkingCopy() {
@@ -453,13 +453,16 @@ Workspace.UISourceCode = class extends Common.Object {
setWorkingCopy(newWorkingCopy) {
this._workingCopy = newWorkingCopy;
delete this._workingCopyGetter;
- this.dispatchEventToListeners(Workspace.UISourceCode.Events.WorkingCopyChanged);
- this._project.workspace().dispatchEventToListeners(
- Workspace.Workspace.Events.WorkingCopyChanged, {uiSourceCode: this});
+ this._workingCopyChanged();
}
setWorkingCopyGetter(workingCopyGetter) {
this._workingCopyGetter = workingCopyGetter;
+ this._workingCopyChanged();
+ }
+
+ _workingCopyChanged() {
+ this._removeAllMessages();
this.dispatchEventToListeners(Workspace.UISourceCode.Events.WorkingCopyChanged);
this._project.workspace().dispatchEventToListeners(
Workspace.Workspace.Events.WorkingCopyChanged, {uiSourceCode: this});
@@ -595,7 +598,7 @@ Workspace.UISourceCode = class extends Common.Object {
this.dispatchEventToListeners(Workspace.UISourceCode.Events.MessageRemoved, message);
}
- removeAllMessages() {
+ _removeAllMessages() {
var messages = this._messages;
this._messages = [];
for (var message of messages)
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/sources/UISourceCodeFrame.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698