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

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

Issue 971703002: DevTools: fix co-existance of multiple DevTools extensions (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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 871 matching lines...) Expand 10 before | Expand all | Expand 10 after
882 unregisterHandler: function(command) 882 unregisterHandler: function(command)
883 { 883 {
884 delete this._handlers[command]; 884 delete this._handlers[command];
885 }, 885 },
886 886
887 /** 887 /**
888 * @return {string} 888 * @return {string}
889 */ 889 */
890 nextObjectId: function() 890 nextObjectId: function()
891 { 891 {
892 return injectedScriptId + "_" + ++this._lastObjectId; 892 return injectedScriptId.toString() + "_" + ++this._lastObjectId;
893 }, 893 },
894 894
895 _registerCallback: function(callback) 895 _registerCallback: function(callback)
896 { 896 {
897 var id = ++this._lastRequestId; 897 var id = ++this._lastRequestId;
898 this._callbacks[id] = callback; 898 this._callbacks[id] = callback;
899 return id; 899 return id;
900 }, 900 },
901 901
902 _onCallback: function(request) 902 _onCallback: function(request)
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1004 { 1004 {
1005 return "(function(injectedScriptId){ " + 1005 return "(function(injectedScriptId){ " +
1006 "var extensionServer;" + 1006 "var extensionServer;" +
1007 defineCommonExtensionSymbols.toString() + ";" + 1007 defineCommonExtensionSymbols.toString() + ";" +
1008 injectedExtensionAPI.toString() + ";" + 1008 injectedExtensionAPI.toString() + ";" +
1009 buildPlatformExtensionAPI(extensionInfo, inspectedTabId) + ";" + 1009 buildPlatformExtensionAPI(extensionInfo, inspectedTabId) + ";" +
1010 "platformExtensionAPI(injectedExtensionAPI(injectedScriptId));" + 1010 "platformExtensionAPI(injectedExtensionAPI(injectedScriptId));" +
1011 "return {};" + 1011 "return {};" +
1012 "})"; 1012 "})";
1013 } 1013 }
OLDNEW
« no previous file with comments | « LayoutTests/inspector/extensions/multiple-extensions-expected.txt ('k') | Source/web/WebDevToolsFrontendImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698