| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |