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

Side by Side Diff: Source/devtools/front_end/host/InspectorFrontendHost.js

Issue 725583003: [DevTools] Prepare to pass modified InspectorFrontendHost to inspector app. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fixed comment Created 6 years, 1 month 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) 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
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
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();
OLDNEW
« no previous file with comments | « Source/devtools/front_end/host/InspectorAppHost.js ('k') | Source/devtools/front_end/host/module.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698