| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 }, | 252 }, |
| 253 | 253 |
| 254 /** | 254 /** |
| 255 * @param {string} eventType | 255 * @param {string} eventType |
| 256 */ | 256 */ |
| 257 unsubscribe: function(eventType) | 257 unsubscribe: function(eventType) |
| 258 { | 258 { |
| 259 } | 259 } |
| 260 } | 260 } |
| 261 | 261 |
| 262 // Inherit bindings from the embedder. | |
| 263 if (top !== window) { | |
| 264 window.InspectorFrontendHost = top.InspectorFrontendHost; | |
| 265 } | |
| 266 | |
| 267 if (!window.InspectorFrontendHost) { | 262 if (!window.InspectorFrontendHost) { |
| 268 InspectorFrontendHost = new WebInspector.InspectorFrontendHostStub(); | 263 InspectorFrontendHost = new WebInspector.InspectorFrontendHostStub(); |
| 269 } else { | 264 } else { |
| 270 var proto = WebInspector.InspectorFrontendHostStub.prototype; | 265 var proto = WebInspector.InspectorFrontendHostStub.prototype; |
| 271 for (var name in proto) { | 266 for (var name in proto) { |
| 272 var value = proto[name]; | 267 var value = proto[name]; |
| 273 if (typeof value !== "function" || InspectorFrontendHost[name]) | 268 if (typeof value !== "function" || InspectorFrontendHost[name]) |
| 274 continue; | 269 continue; |
| 275 InspectorFrontendHost[name] = function(name) { | 270 InspectorFrontendHost[name] = function(name) { |
| 276 var message = "Incompatible embedder: method InspectorFrontendHost."
+ name + " is missing. Using stub instead."; | 271 var message = "Incompatible embedder: method InspectorFrontendHost."
+ name + " is missing. Using stub instead."; |
| 277 WebInspector.messageSink.addErrorMessage(message, true); | 272 WebInspector.messageSink.addErrorMessage(message, true); |
| 278 var args = Array.prototype.slice.call(arguments, 1); | 273 var args = Array.prototype.slice.call(arguments, 1); |
| 279 return proto[name].apply(InspectorFrontendHost, args); | 274 return proto[name].apply(InspectorFrontendHost, args); |
| 280 }.bind(null, name); | 275 }.bind(null, name); |
| 281 } | 276 } |
| 282 } | 277 } |
| OLD | NEW |