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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/animation/AnimationModel.js

Issue 2851913002: [DevTools] Do not expose agents on Target
Patch Set: storage and tests.js Created 3 years, 7 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
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @unrestricted 6 * @unrestricted
7 */ 7 */
8 Animation.AnimationModel = class extends SDK.SDKModel { 8 Animation.AnimationModel = class extends SDK.SDKModel {
9 /** 9 /**
10 * @param {!SDK.Target} target 10 * @param {!SDK.Target} target
11 * @param {!Protocol.Dispatcher} dispatcher
11 */ 12 */
12 constructor(target) { 13 constructor(target, dispatcher) {
13 super(target); 14 super(target, dispatcher);
14 this._runtimeModel = /** @type {!SDK.RuntimeModel} */ (target.model(SDK.Runt imeModel)); 15 this._runtimeModel = /** @type {!SDK.RuntimeModel} */ (target.model(SDK.Runt imeModel));
15 this._agent = target.animationAgent(); 16 this._agent = dispatcher.animationAgent();
16 target.registerAnimationDispatcher(new Animation.AnimationDispatcher(this)); 17 dispatcher.registerAnimationDispatcher(new Animation.AnimationDispatcher(thi s));
17 /** @type {!Map.<string, !Animation.AnimationModel.Animation>} */ 18 /** @type {!Map.<string, !Animation.AnimationModel.Animation>} */
18 this._animationsById = new Map(); 19 this._animationsById = new Map();
19 /** @type {!Map.<string, !Animation.AnimationModel.AnimationGroup>} */ 20 /** @type {!Map.<string, !Animation.AnimationModel.AnimationGroup>} */
20 this._animationGroups = new Map(); 21 this._animationGroups = new Map();
21 /** @type {!Array.<string>} */ 22 /** @type {!Array.<string>} */
22 this._pendingAnimations = []; 23 this._pendingAnimations = [];
23 this._playbackRate = 1; 24 this._playbackRate = 1;
24 var resourceTreeModel = /** @type {!SDK.ResourceTreeModel} */ (target.model( SDK.ResourceTreeModel)); 25 var resourceTreeModel = /** @type {!SDK.ResourceTreeModel} */ (target.model( SDK.ResourceTreeModel));
25 resourceTreeModel.addEventListener(SDK.ResourceTreeModel.Events.MainFrameNav igated, this._reset, this); 26 resourceTreeModel.addEventListener(SDK.ResourceTreeModel.Events.MainFrameNav igated, this._reset, this);
26 var screenCaptureModel = target.model(SDK.ScreenCaptureModel); 27 var screenCaptureModel = target.model(SDK.ScreenCaptureModel);
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 delete this._stopTimer; 836 delete this._stopTimer;
836 delete this._endTime; 837 delete this._endTime;
837 this._requests = []; 838 this._requests = [];
838 this._capturing = false; 839 this._capturing = false;
839 this._screenCaptureModel.stopScreencast(); 840 this._screenCaptureModel.stopScreencast();
840 } 841 }
841 }; 842 };
842 843
843 /** @typedef {{ endTime: number, screenshots: !Array.<string>}} */ 844 /** @typedef {{ endTime: number, screenshots: !Array.<string>}} */
844 Animation.AnimationModel.ScreenshotCapture.Request; 845 Animation.AnimationModel.ScreenshotCapture.Request;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698