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

Unified Diff: Source/devtools/front_end/animation/AnimationControlPane.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
« no previous file with comments | « Source/devtools/devtools.gypi ('k') | Source/devtools/front_end/animation/AnimationModel.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/animation/AnimationControlPane.js
diff --git a/Source/devtools/front_end/elements/AnimationControlPane.js b/Source/devtools/front_end/animation/AnimationControlPane.js
similarity index 95%
rename from Source/devtools/front_end/elements/AnimationControlPane.js
rename to Source/devtools/front_end/animation/AnimationControlPane.js
index 7f1eddb73e0b6d966bbd63e29d07a3bafd9a5428..f6b81dec92f4d38c4b4d9fbee9cc81683e3ec0c4 100644
--- a/Source/devtools/front_end/elements/AnimationControlPane.js
+++ b/Source/devtools/front_end/animation/AnimationControlPane.js
@@ -41,7 +41,7 @@ WebInspector.AnimationControlPane.prototype = {
_playbackSliderInputHandler: function (event)
{
this._animationsPlaybackRate = WebInspector.AnimationTimeline.GlobalPlaybackRates[event.target.value];
- this._target.animationModel.setPlaybackRate(this._animationsPaused ? 0 : this._animationsPlaybackRate);
+ WebInspector.AnimationModel.fromTarget(this._target).setPlaybackRate(this._animationsPaused ? 0 : this._animationsPlaybackRate);
this._animationsPlaybackLabel.textContent = this._animationsPlaybackRate + "x";
WebInspector.userMetrics.AnimationsPlaybackRateChanged.record();
},
@@ -49,7 +49,7 @@ WebInspector.AnimationControlPane.prototype = {
_pauseButtonHandler: function ()
{
this._animationsPaused = !this._animationsPaused;
- this._target.animationModel.setPlaybackRate(this._animationsPaused ? 0 : this._animationsPlaybackRate);
+ WebInspector.AnimationModel.fromTarget(this._target).setPlaybackRate(this._animationsPaused ? 0 : this._animationsPlaybackRate);
WebInspector.userMetrics.AnimationsPlaybackRateChanged.record();
this._animationsPauseButton.element.classList.toggle("pause-toolbar-item");
this._animationsPauseButton.element.classList.toggle("play-toolbar-item");
« no previous file with comments | « Source/devtools/devtools.gypi ('k') | Source/devtools/front_end/animation/AnimationModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698