| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 FrameResized: Symbol('FrameResized'), | 456 FrameResized: Symbol('FrameResized'), |
| 457 FrameWillNavigate: Symbol('FrameWillNavigate'), | 457 FrameWillNavigate: Symbol('FrameWillNavigate'), |
| 458 MainFrameNavigated: Symbol('MainFrameNavigated'), | 458 MainFrameNavigated: Symbol('MainFrameNavigated'), |
| 459 ResourceAdded: Symbol('ResourceAdded'), | 459 ResourceAdded: Symbol('ResourceAdded'), |
| 460 WillLoadCachedResources: Symbol('WillLoadCachedResources'), | 460 WillLoadCachedResources: Symbol('WillLoadCachedResources'), |
| 461 CachedResourcesLoaded: Symbol('CachedResourcesLoaded'), | 461 CachedResourcesLoaded: Symbol('CachedResourcesLoaded'), |
| 462 DOMContentLoaded: Symbol('DOMContentLoaded'), | 462 DOMContentLoaded: Symbol('DOMContentLoaded'), |
| 463 Load: Symbol('Load'), | 463 Load: Symbol('Load'), |
| 464 PageReloadRequested: Symbol('PageReloadRequested'), | 464 PageReloadRequested: Symbol('PageReloadRequested'), |
| 465 WillReloadPage: Symbol('WillReloadPage'), | 465 WillReloadPage: Symbol('WillReloadPage'), |
| 466 ScreencastFrame: Symbol('ScreencastFrame'), | |
| 467 ScreencastVisibilityChanged: Symbol('ScreencastVisibilityChanged'), | |
| 468 ColorPicked: Symbol('ColorPicked'), | 466 ColorPicked: Symbol('ColorPicked'), |
| 469 InterstitialShown: Symbol('InterstitialShown'), | 467 InterstitialShown: Symbol('InterstitialShown'), |
| 470 InterstitialHidden: Symbol('InterstitialHidden') | 468 InterstitialHidden: Symbol('InterstitialHidden') |
| 471 }; | 469 }; |
| 472 | 470 |
| 473 | 471 |
| 474 /** | 472 /** |
| 475 * @unrestricted | 473 * @unrestricted |
| 476 */ | 474 */ |
| 477 SDK.ResourceTreeFrame = class { | 475 SDK.ResourceTreeFrame = class { |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 739 return Common.UIString('<iframe>'); | 737 return Common.UIString('<iframe>'); |
| 740 } | 738 } |
| 741 }; | 739 }; |
| 742 | 740 |
| 743 | 741 |
| 744 /** | 742 /** |
| 745 * @implements {Protocol.PageDispatcher} | 743 * @implements {Protocol.PageDispatcher} |
| 746 * @unrestricted | 744 * @unrestricted |
| 747 */ | 745 */ |
| 748 SDK.PageDispatcher = class { | 746 SDK.PageDispatcher = class { |
| 747 /** |
| 748 * @param {!SDK.ResourceTreeModel} resourceTreeModel |
| 749 */ |
| 749 constructor(resourceTreeModel) { | 750 constructor(resourceTreeModel) { |
| 750 this._resourceTreeModel = resourceTreeModel; | 751 this._resourceTreeModel = resourceTreeModel; |
| 751 } | 752 } |
| 752 | 753 |
| 753 /** | 754 /** |
| 754 * @override | 755 * @override |
| 755 * @param {number} time | 756 * @param {number} time |
| 756 */ | 757 */ |
| 757 domContentEventFired(time) { | 758 domContentEventFired(time) { |
| 758 this._resourceTreeModel.dispatchEventToListeners(SDK.ResourceTreeModel.Event
s.DOMContentLoaded, time); | 759 this._resourceTreeModel.dispatchEventToListeners(SDK.ResourceTreeModel.Event
s.DOMContentLoaded, time); |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 839 /** | 840 /** |
| 840 * @override | 841 * @override |
| 841 * @param {boolean} result | 842 * @param {boolean} result |
| 842 */ | 843 */ |
| 843 javascriptDialogClosed(result) { | 844 javascriptDialogClosed(result) { |
| 844 } | 845 } |
| 845 | 846 |
| 846 /** | 847 /** |
| 847 * @override | 848 * @override |
| 848 * @param {string} data | 849 * @param {string} data |
| 849 * @param {!Protocol.Page.ScreencastFrameMetadata=} metadata | 850 * @param {!Protocol.Page.ScreencastFrameMetadata} metadata |
| 850 * @param {number=} sessionId | 851 * @param {number} sessionId |
| 851 */ | 852 */ |
| 852 screencastFrame(data, metadata, sessionId) { | 853 screencastFrame(data, metadata, sessionId) { |
| 853 this._resourceTreeModel._agent.screencastFrameAck(sessionId); | |
| 854 this._resourceTreeModel.dispatchEventToListeners( | |
| 855 SDK.ResourceTreeModel.Events.ScreencastFrame, {data: data, metadata: met
adata}); | |
| 856 } | 854 } |
| 857 | 855 |
| 858 /** | 856 /** |
| 859 * @override | 857 * @override |
| 860 * @param {boolean} visible | 858 * @param {boolean} visible |
| 861 */ | 859 */ |
| 862 screencastVisibilityChanged(visible) { | 860 screencastVisibilityChanged(visible) { |
| 863 this._resourceTreeModel.dispatchEventToListeners( | |
| 864 SDK.ResourceTreeModel.Events.ScreencastVisibilityChanged, {visible: visi
ble}); | |
| 865 } | 861 } |
| 866 | 862 |
| 867 /** | 863 /** |
| 868 * @override | 864 * @override |
| 869 * @param {!Protocol.DOM.RGBA} color | 865 * @param {!Protocol.DOM.RGBA} color |
| 870 */ | 866 */ |
| 871 colorPicked(color) { | 867 colorPicked(color) { |
| 872 this._resourceTreeModel.dispatchEventToListeners(SDK.ResourceTreeModel.Event
s.ColorPicked, color); | 868 this._resourceTreeModel.dispatchEventToListeners(SDK.ResourceTreeModel.Event
s.ColorPicked, color); |
| 873 } | 869 } |
| 874 | 870 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 888 this._resourceTreeModel.dispatchEventToListeners(SDK.ResourceTreeModel.Event
s.InterstitialHidden); | 884 this._resourceTreeModel.dispatchEventToListeners(SDK.ResourceTreeModel.Event
s.InterstitialHidden); |
| 889 } | 885 } |
| 890 | 886 |
| 891 /** | 887 /** |
| 892 * @override | 888 * @override |
| 893 */ | 889 */ |
| 894 navigationRequested() { | 890 navigationRequested() { |
| 895 // Frontend is not interested in when navigations are requested. | 891 // Frontend is not interested in when navigations are requested. |
| 896 } | 892 } |
| 897 }; | 893 }; |
| OLD | NEW |