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 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 var value = proto[name]; | 428 var value = proto[name]; |
429 if (typeof value !== "function" || InspectorFrontendHost[name]) | 429 if (typeof value !== "function" || InspectorFrontendHost[name]) |
430 continue; | 430 continue; |
431 | 431 |
432 InspectorFrontendHost[name] = stub.bind(null, name); | 432 InspectorFrontendHost[name] = stub.bind(null, name); |
433 } | 433 } |
434 } | 434 } |
435 | 435 |
436 /** | 436 /** |
437 * @param {string} name | 437 * @param {string} name |
| 438 * @return {?} |
438 */ | 439 */ |
439 function stub(name) | 440 function stub(name) |
440 { | 441 { |
441 console.error("Incompatible embedder: method InspectorFrontendHost."
+ name + " is missing. Using stub instead."); | 442 console.error("Incompatible embedder: method InspectorFrontendHost."
+ name + " is missing. Using stub instead."); |
442 var args = Array.prototype.slice.call(arguments, 1); | 443 var args = Array.prototype.slice.call(arguments, 1); |
443 return proto[name].apply(InspectorFrontendHost, args); | 444 return proto[name].apply(InspectorFrontendHost, args); |
444 } | 445 } |
445 | 446 |
446 // Attach the events object. | 447 // Attach the events object. |
447 InspectorFrontendHost.events = new WebInspector.Object(); | 448 InspectorFrontendHost.events = new WebInspector.Object(); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
510 // so the host instance should not initialized there. | 511 // so the host instance should not initialized there. |
511 initializeInspectorFrontendHost(); | 512 initializeInspectorFrontendHost(); |
512 window.InspectorFrontendAPI = new InspectorFrontendAPIImpl(); | 513 window.InspectorFrontendAPI = new InspectorFrontendAPIImpl(); |
513 WebInspector.setLocalizationPlatform(InspectorFrontendHost.platform()); | 514 WebInspector.setLocalizationPlatform(InspectorFrontendHost.platform()); |
514 })(); | 515 })(); |
515 | 516 |
516 /** | 517 /** |
517 * @type {!WebInspector.EventTarget} | 518 * @type {!WebInspector.EventTarget} |
518 */ | 519 */ |
519 InspectorFrontendHost.events; | 520 InspectorFrontendHost.events; |
OLD | NEW |