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

Side by Side Diff: Source/devtools/front_end/extensions/ExtensionAPI.js

Issue 761143003: DevTools: remove ScriptPreprocessor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 5 years, 10 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 698 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 this.onResourceAdded = new EventSink(events.ResourceAdded, dispatchResourceE vent); 709 this.onResourceAdded = new EventSink(events.ResourceAdded, dispatchResourceE vent);
710 this.onResourceContentCommitted = new EventSink(events.ResourceContentCommit ted, dispatchResourceContentEvent); 710 this.onResourceContentCommitted = new EventSink(events.ResourceContentCommit ted, dispatchResourceContentEvent);
711 } 711 }
712 712
713 InspectedWindow.prototype = { 713 InspectedWindow.prototype = {
714 reload: function(optionsOrUserAgent) 714 reload: function(optionsOrUserAgent)
715 { 715 {
716 var options = null; 716 var options = null;
717 if (typeof optionsOrUserAgent === "object") { 717 if (typeof optionsOrUserAgent === "object") {
718 options = optionsOrUserAgent; 718 options = optionsOrUserAgent;
719 if (options.preprocessingScript)
720 console.warn("Please avoid using 'preprocessingScript' option to chrome.devtools.inspectedWindow.reload(), support for it will be removed soon." );
721 } else if (typeof optionsOrUserAgent === "string") { 719 } else if (typeof optionsOrUserAgent === "string") {
722 options = { userAgent: optionsOrUserAgent }; 720 options = { userAgent: optionsOrUserAgent };
723 console.warn("Passing userAgent as string parameter to inspectedWind ow.reload() is deprecated. " + 721 console.warn("Passing userAgent as string parameter to inspectedWind ow.reload() is deprecated. " +
724 "Use inspectedWindow.reload({ userAgent: value}) instea d."); 722 "Use inspectedWindow.reload({ userAgent: value}) instea d.");
725 } 723 }
726 extensionServer.sendRequest({ command: commands.Reload, options: options }); 724 extensionServer.sendRequest({ command: commands.Reload, options: options });
727 }, 725 },
728 726
729 /** 727 /**
730 * @return {?Object} 728 * @return {?Object}
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
1006 { 1004 {
1007 return "(function(injectedScriptId){ " + 1005 return "(function(injectedScriptId){ " +
1008 "var extensionServer;" + 1006 "var extensionServer;" +
1009 defineCommonExtensionSymbols.toString() + ";" + 1007 defineCommonExtensionSymbols.toString() + ";" +
1010 injectedExtensionAPI.toString() + ";" + 1008 injectedExtensionAPI.toString() + ";" +
1011 buildPlatformExtensionAPI(extensionInfo, inspectedTabId) + ";" + 1009 buildPlatformExtensionAPI(extensionInfo, inspectedTabId) + ";" +
1012 "platformExtensionAPI(injectedExtensionAPI(injectedScriptId));" + 1010 "platformExtensionAPI(injectedExtensionAPI(injectedScriptId));" +
1013 "return {};" + 1011 "return {};" +
1014 "})"; 1012 "})";
1015 } 1013 }
OLDNEW
« no previous file with comments | « Source/core/inspector/PageDebuggerAgent.cpp ('k') | Source/devtools/front_end/extensions/ExtensionServer.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698