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

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

Issue 471433004: DevTools: Split out the "workspace" and "bindings" modules from "sdk" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove marker interfaces and WI.SourceMapping Created 6 years, 4 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 | Annotate | Revision Log
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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 /** 220 /**
221 * @param {!WebInspector.NetworkRequest} request 221 * @param {!WebInspector.NetworkRequest} request
222 * @return {!Element} 222 * @return {!Element}
223 */ 223 */
224 WebInspector.linkifyRequestAsNode = function(request) 224 WebInspector.linkifyRequestAsNode = function(request)
225 { 225 {
226 var anchor = WebInspector.linkifyURLAsNode(request.url); 226 var anchor = WebInspector.linkifyURLAsNode(request.url);
227 anchor.requestId = request.requestId; 227 anchor.requestId = request.requestId;
228 return anchor; 228 return anchor;
229 } 229 }
230
231 /**
232 * @param {?string} content
233 * @param {string} mimeType
234 * @param {boolean} contentEncoded
235 * @return {?string}
236 */
237 WebInspector.contentAsDataURL = function(content, mimeType, contentEncoded)
238 {
239 const maxDataUrlSize = 1024 * 1024;
240 if (content === null || content.length > maxDataUrlSize)
241 return null;
242
243 return "data:" + mimeType + (contentEncoded ? ";base64," : ",") + content;
244 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/bindings/ResourceScriptMapping.js ('k') | Source/devtools/front_end/bindings/SASSSourceMapping.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698