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

Side by Side Diff: Source/devtools/front_end/sdk/ResourceTreeModel.js

Issue 362773003: [DevTools] Explicitly enable/disable Page.viewportChanged protocol event. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 months 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) 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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 * @param {boolean=} ignoreCache 465 * @param {boolean=} ignoreCache
466 * @param {string=} scriptToEvaluateOnLoad 466 * @param {string=} scriptToEvaluateOnLoad
467 * @param {string=} scriptPreprocessor 467 * @param {string=} scriptPreprocessor
468 */ 468 */
469 reloadPage: function(ignoreCache, scriptToEvaluateOnLoad, scriptPreprocessor ) 469 reloadPage: function(ignoreCache, scriptToEvaluateOnLoad, scriptPreprocessor )
470 { 470 {
471 this.dispatchEventToListeners(WebInspector.ResourceTreeModel.EventTypes. WillReloadPage); 471 this.dispatchEventToListeners(WebInspector.ResourceTreeModel.EventTypes. WillReloadPage);
472 this._agent.reload(ignoreCache, scriptToEvaluateOnLoad, scriptPreprocess or); 472 this._agent.reload(ignoreCache, scriptToEvaluateOnLoad, scriptPreprocess or);
473 }, 473 },
474 474
475 /**
476 * @param {boolean} enabled
477 */
478 setViewportChangedEventEnabled: function(enabled)
479 {
480 this._agent.setViewportChangedEventEnabled(enabled);
481 },
482
475 __proto__: WebInspector.TargetAwareObject.prototype 483 __proto__: WebInspector.TargetAwareObject.prototype
476 } 484 }
477 485
478 /** 486 /**
479 * @constructor 487 * @constructor
480 * @param {!WebInspector.ResourceTreeModel} model 488 * @param {!WebInspector.ResourceTreeModel} model
481 * @param {?WebInspector.ResourceTreeFrame} parentFrame 489 * @param {?WebInspector.ResourceTreeFrame} parentFrame
482 * @param {!PageAgent.FrameId} frameId 490 * @param {!PageAgent.FrameId} frameId
483 * @param {!PageAgent.Frame=} payload 491 * @param {!PageAgent.Frame=} payload
484 */ 492 */
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
820 viewportChanged: function(viewport) 828 viewportChanged: function(viewport)
821 { 829 {
822 this._resourceTreeModel.dispatchEventToListeners(WebInspector.ResourceTr eeModel.EventTypes.ViewportChanged, viewport); 830 this._resourceTreeModel.dispatchEventToListeners(WebInspector.ResourceTr eeModel.EventTypes.ViewportChanged, viewport);
823 } 831 }
824 } 832 }
825 833
826 /** 834 /**
827 * @type {!WebInspector.ResourceTreeModel} 835 * @type {!WebInspector.ResourceTreeModel}
828 */ 836 */
829 WebInspector.resourceTreeModel; 837 WebInspector.resourceTreeModel;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698