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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: Source/devtools/front_end/animation/AnimationModel.js
diff --git a/Source/devtools/front_end/sdk/AnimationModel.js b/Source/devtools/front_end/animation/AnimationModel.js
similarity index 96%
rename from Source/devtools/front_end/sdk/AnimationModel.js
rename to Source/devtools/front_end/animation/AnimationModel.js
index 1c42e10a1ceb7c0d5bc9ff58a6060be1b69e3a5c..05465ed8f51e917c85371b7a655df50bc0e6ce7b 100644
--- a/Source/devtools/front_end/sdk/AnimationModel.js
+++ b/Source/devtools/front_end/animation/AnimationModel.js
@@ -82,6 +82,20 @@ WebInspector.AnimationModel.prototype = {
__proto__: WebInspector.SDKModel.prototype
}
+WebInspector.AnimationModel._symbol = Symbol("AnimationModel");
+
+/**
+ * @param {!WebInspector.Target} target
+ * @return {!WebInspector.AnimationModel}
+ */
+WebInspector.AnimationModel.fromTarget = function(target)
+{
+ if (!target[WebInspector.AnimationModel._symbol])
+ target[WebInspector.AnimationModel._symbol] = new WebInspector.AnimationModel(target);
+
+ return target[WebInspector.AnimationModel._symbol];
+}
+
/**
* @constructor
* @extends {WebInspector.SDKObject}
« 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