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

Side by Side Diff: Source/devtools/front_end/ResourceUtils.js

Issue 23484056: [DevTools] Renaming Scripts panel to Sources panel (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Modified missed files Created 7 years, 3 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) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). 3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com).
4 * Copyright (C) 2009 Joseph Pecoraro 4 * Copyright (C) 2009 Joseph Pecoraro
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 * @param {number=} lineNumber 141 * @param {number=} lineNumber
142 * @param {number=} columnNumber 142 * @param {number=} columnNumber
143 * @return {Node} 143 * @return {Node}
144 */ 144 */
145 function linkifier(title, url, lineNumber, columnNumber) 145 function linkifier(title, url, lineNumber, columnNumber)
146 { 146 {
147 var isExternal = !WebInspector.resourceForURL(url) && !WebInspector.work space.uiSourceCodeForURL(url); 147 var isExternal = !WebInspector.resourceForURL(url) && !WebInspector.work space.uiSourceCodeForURL(url);
148 var urlNode = WebInspector.linkifyURLAsNode(url, title, undefined, isExt ernal); 148 var urlNode = WebInspector.linkifyURLAsNode(url, title, undefined, isExt ernal);
149 if (typeof lineNumber !== "undefined") { 149 if (typeof lineNumber !== "undefined") {
150 urlNode.lineNumber = lineNumber; 150 urlNode.lineNumber = lineNumber;
151 urlNode.preferredPanel = "scripts"; 151 urlNode.preferredPanel = "sources";
152 if (typeof columnNumber !== "undefined") 152 if (typeof columnNumber !== "undefined")
153 urlNode.columnNumber = columnNumber; 153 urlNode.columnNumber = columnNumber;
154 } 154 }
155 155
156 return urlNode; 156 return urlNode;
157 } 157 }
158 158
159 return WebInspector.linkifyStringAsFragmentWithCustomLinkifier(string, linki fier); 159 return WebInspector.linkifyStringAsFragmentWithCustomLinkifier(string, linki fier);
160 } 160 }
161 161
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 * @return {?string} 235 * @return {?string}
236 */ 236 */
237 WebInspector.contentAsDataURL = function(content, mimeType, contentEncoded) 237 WebInspector.contentAsDataURL = function(content, mimeType, contentEncoded)
238 { 238 {
239 const maxDataUrlSize = 1024 * 1024; 239 const maxDataUrlSize = 1024 * 1024;
240 if (content == null || content.length > maxDataUrlSize) 240 if (content == null || content.length > maxDataUrlSize)
241 return null; 241 return null;
242 242
243 return "data:" + mimeType + (contentEncoded ? ";base64," : ",") + content; 243 return "data:" + mimeType + (contentEncoded ? ";base64," : ",") + content;
244 } 244 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/NavigatorView.js ('k') | Source/devtools/front_end/ScriptsNavigator.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698