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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js

Issue 1564113003: DevTools: merge uisourcecode's url-alike members. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments addressed Created 4 years, 11 months 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 { 105 {
106 if (!this.uiSourceCode().contentType().isScript()) 106 if (!this.uiSourceCode().contentType().isScript())
107 return; 107 return;
108 108
109 if (this._divergedInfobar) 109 if (this._divergedInfobar)
110 this._divergedInfobar.dispose(); 110 this._divergedInfobar.dispose();
111 111
112 var infobar = new WebInspector.UISourceCodeFrame.Infobar(WebInspector.In fobar.Type.Warning, WebInspector.UIString("Workspace mapping mismatch")); 112 var infobar = new WebInspector.UISourceCodeFrame.Infobar(WebInspector.In fobar.Type.Warning, WebInspector.UIString("Workspace mapping mismatch"));
113 this._divergedInfobar = infobar; 113 this._divergedInfobar = infobar;
114 114
115 var fileURL = this.uiSourceCode().originURL(); 115 var fileURL = this.uiSourceCode().url();
116 infobar.createDetailsRowMessage(WebInspector.UIString("The content of th is file on the file system:\u00a0")).appendChild( 116 infobar.createDetailsRowMessage(WebInspector.UIString("The content of th is file on the file system:\u00a0")).appendChild(
117 WebInspector.linkifyURLAsNode(fileURL, fileURL, "source-frame-infoba r-details-url", true)); 117 WebInspector.linkifyURLAsNode(fileURL, fileURL, "source-frame-infoba r-details-url", true));
118 118
119 var scriptURL = WebInspector.networkMapping.networkURL(this.uiSourceCode ()); 119 var scriptURL = WebInspector.networkMapping.networkURL(this.uiSourceCode ());
120 infobar.createDetailsRowMessage(WebInspector.UIString("does not match th e loaded script:\u00a0")).appendChild( 120 infobar.createDetailsRowMessage(WebInspector.UIString("does not match th e loaded script:\u00a0")).appendChild(
121 WebInspector.linkifyURLAsNode(scriptURL, scriptURL, "source-frame-in fobar-details-url", true)); 121 WebInspector.linkifyURLAsNode(scriptURL, scriptURL, "source-frame-in fobar-details-url", true));
122 122
123 infobar.createDetailsRowMessage(); 123 infobar.createDetailsRowMessage();
124 infobar.createDetailsRowMessage(WebInspector.UIString("Possible solution s are:")); 124 infobar.createDetailsRowMessage(WebInspector.UIString("Possible solution s are:"));
125 125
(...skipping 15 matching lines...) Expand all
141 }, 141 },
142 142
143 _showBlackboxInfobarIfNeeded: function() 143 _showBlackboxInfobarIfNeeded: function()
144 { 144 {
145 if (!this.uiSourceCode().contentType().hasScripts()) 145 if (!this.uiSourceCode().contentType().hasScripts())
146 return; 146 return;
147 var projectType = this.uiSourceCode().project().type(); 147 var projectType = this.uiSourceCode().project().type();
148 if (projectType === WebInspector.projectTypes.Snippets) 148 if (projectType === WebInspector.projectTypes.Snippets)
149 return; 149 return;
150 var networkURL = WebInspector.networkMapping.networkURL(this.uiSourceCod e()); 150 var networkURL = WebInspector.networkMapping.networkURL(this.uiSourceCod e());
151 var url = projectType === WebInspector.projectTypes.Formatter ? this.uiS ourceCode().originURL() : networkURL; 151 var url = projectType === WebInspector.projectTypes.Formatter ? this.uiS ourceCode().url() : networkURL;
152 var isContentScript = projectType === WebInspector.projectTypes.ContentS cripts; 152 var isContentScript = projectType === WebInspector.projectTypes.ContentS cripts;
153 if (!WebInspector.BlackboxSupport.isBlackboxed(url, isContentScript)) { 153 if (!WebInspector.BlackboxSupport.isBlackboxed(url, isContentScript)) {
154 this._hideBlackboxInfobar(); 154 this._hideBlackboxInfobar();
155 return; 155 return;
156 } 156 }
157 157
158 if (this._blackboxInfobar) 158 if (this._blackboxInfobar)
159 this._blackboxInfobar.dispose(); 159 this._blackboxInfobar.dispose();
160 160
161 var infobar = new WebInspector.UISourceCodeFrame.Infobar(WebInspector.In fobar.Type.Warning, WebInspector.UIString("This script is blackboxed in debugger ")); 161 var infobar = new WebInspector.UISourceCodeFrame.Infobar(WebInspector.In fobar.Type.Warning, WebInspector.UIString("This script is blackboxed in debugger "));
(...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after
1070 this.uiSourceCode().removeEventListener(WebInspector.UISourceCode.Events .WorkingCopyChanged, this._workingCopyChanged, this); 1070 this.uiSourceCode().removeEventListener(WebInspector.UISourceCode.Events .WorkingCopyChanged, this._workingCopyChanged, this);
1071 this.uiSourceCode().removeEventListener(WebInspector.UISourceCode.Events .WorkingCopyCommitted, this._workingCopyCommitted, this); 1071 this.uiSourceCode().removeEventListener(WebInspector.UISourceCode.Events .WorkingCopyCommitted, this._workingCopyCommitted, this);
1072 this.uiSourceCode().removeEventListener(WebInspector.UISourceCode.Events .TitleChanged, this._showBlackboxInfobarIfNeeded, this); 1072 this.uiSourceCode().removeEventListener(WebInspector.UISourceCode.Events .TitleChanged, this._showBlackboxInfobarIfNeeded, this);
1073 WebInspector.moduleSetting("skipStackFramesPattern").removeChangeListene r(this._showBlackboxInfobarIfNeeded, this); 1073 WebInspector.moduleSetting("skipStackFramesPattern").removeChangeListene r(this._showBlackboxInfobarIfNeeded, this);
1074 WebInspector.moduleSetting("skipContentScripts").removeChangeListener(th is._showBlackboxInfobarIfNeeded, this); 1074 WebInspector.moduleSetting("skipContentScripts").removeChangeListener(th is._showBlackboxInfobarIfNeeded, this);
1075 WebInspector.UISourceCodeFrame.prototype.dispose.call(this); 1075 WebInspector.UISourceCodeFrame.prototype.dispose.call(this);
1076 }, 1076 },
1077 1077
1078 __proto__: WebInspector.UISourceCodeFrame.prototype 1078 __proto__: WebInspector.UISourceCodeFrame.prototype
1079 } 1079 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698