| 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 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 625 return true; | 625 return true; |
| 626 } | 626 } |
| 627 }; | 627 }; |
| 628 | 628 |
| 629 /** | 629 /** |
| 630 * @type {!InspectorFrontendHostAPI} | 630 * @type {!InspectorFrontendHostAPI} |
| 631 */ | 631 */ |
| 632 var InspectorFrontendHost = window.InspectorFrontendHost || null; | 632 var InspectorFrontendHost = window.InspectorFrontendHost || null; |
| 633 | 633 |
| 634 (function() { | 634 (function() { |
| 635 if (window.top) { | |
| 636 // FIXME(dgozman): use InspectorAppHost everywhere in inspector app inst
ead of InspectorFrontendHost. | |
| 637 InspectorFrontendHost = window.top.InspectorFrontendHost || null; | |
| 638 } | |
| 639 if (!InspectorFrontendHost) { | 635 if (!InspectorFrontendHost) { |
| 640 // Instantiate stub for web-hosted mode if necessary. | 636 // Instantiate stub for web-hosted mode if necessary. |
| 641 InspectorFrontendHost = new WebInspector.InspectorFrontendHostStub(); | 637 InspectorFrontendHost = new WebInspector.InspectorFrontendHostStub(); |
| 642 } else { | 638 } else { |
| 643 // Otherwise add stubs for missing methods that are declared in the inte
rface. | 639 // Otherwise add stubs for missing methods that are declared in the inte
rface. |
| 644 var proto = WebInspector.InspectorFrontendHostStub.prototype; | 640 var proto = WebInspector.InspectorFrontendHostStub.prototype; |
| 645 for (var name in proto) { | 641 for (var name in proto) { |
| 646 var value = proto[name]; | 642 var value = proto[name]; |
| 647 if (typeof value !== "function" || InspectorFrontendHost[name]) | 643 if (typeof value !== "function" || InspectorFrontendHost[name]) |
| 648 continue; | 644 continue; |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 710 * @param {number} id | 706 * @param {number} id |
| 711 * @param {?string} error | 707 * @param {?string} error |
| 712 */ | 708 */ |
| 713 embedderMessageAck: function(id, error) | 709 embedderMessageAck: function(id, error) |
| 714 { | 710 { |
| 715 InspectorFrontendHost["embedderMessageAck"](id, error); | 711 InspectorFrontendHost["embedderMessageAck"](id, error); |
| 716 } | 712 } |
| 717 } | 713 } |
| 718 | 714 |
| 719 var InspectorFrontendAPI = new InspectorFrontendAPIImpl(); | 715 var InspectorFrontendAPI = new InspectorFrontendAPIImpl(); |
| OLD | NEW |