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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/main/FrontendWebSocketAPI.js

Issue 1564113003: DevTools: merge uisourcecode's url-alike members. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @constructor 6 * @constructor
7 * @implements {WebInspector.Linkifier.LinkHandler} 7 * @implements {WebInspector.Linkifier.LinkHandler}
8 */ 8 */
9 WebInspector.FrontendWebSocketAPI = function() 9 WebInspector.FrontendWebSocketAPI = function()
10 { 10 {
(...skipping 20 matching lines...) Expand all
31 /** 31 /**
32 * @override 32 * @override
33 * @param {string} url 33 * @param {string} url
34 * @param {number=} lineNumber 34 * @param {number=} lineNumber
35 * @return {boolean} 35 * @return {boolean}
36 */ 36 */
37 handleLink: function(url, lineNumber) 37 handleLink: function(url, lineNumber)
38 { 38 {
39 var uiSourceCode = WebInspector.networkMapping.uiSourceCodeForURLForAnyT arget(url); 39 var uiSourceCode = WebInspector.networkMapping.uiSourceCodeForURLForAnyT arget(url);
40 if (uiSourceCode) 40 if (uiSourceCode)
41 url = uiSourceCode.originURL(); 41 url = uiSourceCode.url();
dgozman 2016/01/08 20:22:06 Kill this file already!
pfeldman 2016/01/08 23:56:32 Separate patch.
42 if (url.startsWith("file://")) { 42 if (url.startsWith("file://")) {
43 var file = url.substring(7); 43 var file = url.substring(7);
44 this._issueFrontendAPINotification("Frontend.revealLocation", { file : file, line: lineNumber }); 44 this._issueFrontendAPINotification("Frontend.revealLocation", { file : file, line: lineNumber });
45 return true; 45 return true;
46 } 46 }
47 return false; 47 return false;
48 }, 48 },
49 49
50 /** 50 /**
51 * @param {!WebInspector.Event} event 51 * @param {!WebInspector.Event} event
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 86
87 /** 87 /**
88 * @param {!WebInspector.Event} event 88 * @param {!WebInspector.Event} event
89 * @param {boolean=} saved 89 * @param {boolean=} saved
90 */ 90 */
91 _workingCopyChanged: function(event, saved) 91 _workingCopyChanged: function(event, saved)
92 { 92 {
93 if (this._dispatchingFrontendMessage) 93 if (this._dispatchingFrontendMessage)
94 return; 94 return;
95 var uiSourceCode = /** @type {!WebInspector.UISourceCode} */ (event.data ["uiSourceCode"]); 95 var uiSourceCode = /** @type {!WebInspector.UISourceCode} */ (event.data ["uiSourceCode"]);
96 var url = uiSourceCode.originURL(); 96 var url = uiSourceCode.url();
97 if (url.startsWith("file://")) 97 if (url.startsWith("file://"))
98 url = url.substring(7); 98 url = url.substring(7);
99 var params = { file: url, buffer: uiSourceCode.workingCopy() }; 99 var params = { file: url, buffer: uiSourceCode.workingCopy() };
100 if (saved) 100 if (saved)
101 params.saved = true; 101 params.saved = true;
102 this._issueFrontendAPINotification("Frontend.bufferUpdated", params); 102 this._issueFrontendAPINotification("Frontend.bufferUpdated", params);
103 }, 103 },
104 104
105 /** 105 /**
106 * @param {!WebInspector.Event} event 106 * @param {!WebInspector.Event} event
(...skipping 17 matching lines...) Expand all
124 124
125 /** 125 /**
126 * @param {string} method 126 * @param {string} method
127 * @param {?Object} params 127 * @param {?Object} params
128 */ 128 */
129 _issueFrontendAPINotification: function(method, params) 129 _issueFrontendAPINotification: function(method, params)
130 { 130 {
131 InspectorFrontendHost.sendFrontendAPINotification(JSON.stringify({ metho d: method, params: params })); 131 InspectorFrontendHost.sendFrontendAPINotification(JSON.stringify({ metho d: method, params: params }));
132 } 132 }
133 } 133 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698