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

Unified Diff: inspector/front-end/InjectedScriptAccess.js

Issue 542055: DevTools: injected script per context(WebCore part) (Closed) Base URL: http://svn.webkit.org/repository/webkit/trunk/WebCore/
Patch Set: '' Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « inspector/front-end/InjectedScript.js ('k') | inspector/front-end/MetricsSidebarPane.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: inspector/front-end/InjectedScriptAccess.js
===================================================================
--- inspector/front-end/InjectedScriptAccess.js (revision 53180)
+++ inspector/front-end/InjectedScriptAccess.js (working copy)
@@ -29,11 +29,25 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-var InjectedScriptAccess = {};
+function InjectedScriptAccess(injectedScriptId) {
+ this._injectedScriptId = injectedScriptId;
+}
+InjectedScriptAccess.get = function(injectedScriptId)
+{
+ return new InjectedScriptAccess(injectedScriptId);
+}
+
+InjectedScriptAccess.getDefault = function()
+{
+ return InjectedScriptAccess.get(0);
+}
+
+InjectedScriptAccess.prototype = {};
+
InjectedScriptAccess._installHandler = function(methodName, async)
{
- InjectedScriptAccess[methodName] = function()
+ InjectedScriptAccess.prototype[methodName] = function()
{
var allArgs = Array.prototype.slice.call(arguments);
var callback = allArgs[allArgs.length - 1];
@@ -47,7 +61,8 @@
WebInspector.console.addMessage(new WebInspector.ConsoleTextMessage("Error dispatching: " + methodName));
}
var callId = WebInspector.Callback.wrap(myCallback);
- InspectorBackend.dispatchOnInjectedScript(callId, methodName, argsString, !!async);
+
+ InspectorBackend.dispatchOnInjectedScript(callId, this._injectedScriptId, methodName, argsString, !!async);
};
}
« no previous file with comments | « inspector/front-end/InjectedScript.js ('k') | inspector/front-end/MetricsSidebarPane.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698