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

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

Issue 13816005: Add preprocessor to reloadOptions in chrome.devtools.inspectedWindow.reload(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: remove unnecessary include Created 7 years, 5 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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 return true; 319 return true;
320 }, 320 },
321 321
322 _onReload: function(message) 322 _onReload: function(message)
323 { 323 {
324 var options = /** @type ExtensionReloadOptions */ (message.options || {} ); 324 var options = /** @type ExtensionReloadOptions */ (message.options || {} );
325 NetworkAgent.setUserAgentOverride(typeof options.userAgent === "string" ? options.userAgent : ""); 325 NetworkAgent.setUserAgentOverride(typeof options.userAgent === "string" ? options.userAgent : "");
326 var injectedScript; 326 var injectedScript;
327 if (options.injectedScript) 327 if (options.injectedScript)
328 injectedScript = "(function(){" + options.injectedScript + "})()"; 328 injectedScript = "(function(){" + options.injectedScript + "})()";
329 PageAgent.reload(!!options.ignoreCache, injectedScript); 329 var preprocessingScript = options.preprocessingScript;
330 PageAgent.reload(!!options.ignoreCache, injectedScript, preprocessingScr ipt);
330 return this._status.OK(); 331 return this._status.OK();
331 }, 332 },
332 333
333 _onEvaluateOnInspectedPage: function(message, port) 334 _onEvaluateOnInspectedPage: function(message, port)
334 { 335 {
335 /** 336 /**
336 * @param {?Protocol.Error} error 337 * @param {?Protocol.Error} error
337 * @param {RuntimeAgent.RemoteObject} resultPayload 338 * @param {RuntimeAgent.RemoteObject} resultPayload
338 * @param {boolean=} wasThrown 339 * @param {boolean=} wasThrown
339 */ 340 */
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
898 899
899 WebInspector.extensionServer = new WebInspector.ExtensionServer(); 900 WebInspector.extensionServer = new WebInspector.ExtensionServer();
900 901
901 window.addExtension = function(page, name) 902 window.addExtension = function(page, name)
902 { 903 {
903 WebInspector.extensionServer._addExtension({ 904 WebInspector.extensionServer._addExtension({
904 startPage: page, 905 startPage: page,
905 name: name, 906 name: name,
906 }); 907 });
907 } 908 }
OLDNEW
« no previous file with comments | « LayoutTests/inspector/extensions/extensions-reload-expected.txt ('k') | Source/devtools/front_end/externs.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698