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

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

Issue 1151263007: Devtools: Move animation to separate module (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 // 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 /** 6 /**
7 * @constructor 7 * @constructor
8 * @extends {WebInspector.SDKModel} 8 * @extends {WebInspector.SDKModel}
9 * @param {!WebInspector.Target} target 9 * @param {!WebInspector.Target} target
10 */ 10 */
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 { 75 {
76 if (this._enabled) 76 if (this._enabled)
77 return; 77 return;
78 this._agent.enable(); 78 this._agent.enable();
79 this._enabled = true; 79 this._enabled = true;
80 }, 80 },
81 81
82 __proto__: WebInspector.SDKModel.prototype 82 __proto__: WebInspector.SDKModel.prototype
83 } 83 }
84 84
85 WebInspector.AnimationModel._symbol = Symbol("AnimationModel");
86
87 /**
88 * @param {!WebInspector.Target} target
89 * @return {!WebInspector.AnimationModel}
90 */
91 WebInspector.AnimationModel.fromTarget = function(target)
92 {
93 if (!target[WebInspector.AnimationModel._symbol])
94 target[WebInspector.AnimationModel._symbol] = new WebInspector.Animation Model(target);
95
96 return target[WebInspector.AnimationModel._symbol];
97 }
98
85 /** 99 /**
86 * @constructor 100 * @constructor
87 * @extends {WebInspector.SDKObject} 101 * @extends {WebInspector.SDKObject}
88 * @param {!WebInspector.Target} target 102 * @param {!WebInspector.Target} target
89 * @param {!AnimationAgent.AnimationPlayer} payload 103 * @param {!AnimationAgent.AnimationPlayer} payload
90 */ 104 */
91 WebInspector.AnimationModel.AnimationPlayer = function(target, payload) 105 WebInspector.AnimationModel.AnimationPlayer = function(target, payload)
92 { 106 {
93 WebInspector.SDKObject.call(this, target); 107 WebInspector.SDKObject.call(this, target);
94 this._payload = payload; 108 this._payload = payload;
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 489
476 /** 490 /**
477 * @override 491 * @override
478 * @param {string} playerId 492 * @param {string} playerId
479 */ 493 */
480 animationPlayerCanceled: function(playerId) 494 animationPlayerCanceled: function(playerId)
481 { 495 {
482 this._animationModel.animationPlayerCanceled(playerId); 496 this._animationModel.animationPlayerCanceled(playerId);
483 } 497 }
484 } 498 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/animation/AnimationControlPane.js ('k') | Source/devtools/front_end/animation/AnimationTimeline.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698