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

Unified Diff: Source/core/animation/Player.h

Issue 48523004: Have Player take the DocumentTimeline object by reference (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 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/core/animation/DocumentTimeline.cpp ('k') | Source/core/animation/Player.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/Player.h
diff --git a/Source/core/animation/Player.h b/Source/core/animation/Player.h
index 3e892d76ad7b00192cc28a0e79d294a3311055d7..d0073aadef54d8a5aba59b19164d69619df15c73 100644
--- a/Source/core/animation/Player.h
+++ b/Source/core/animation/Player.h
@@ -42,7 +42,7 @@ class Player FINAL : public RefCounted<Player> {
public:
~Player();
- static PassRefPtr<Player> create(DocumentTimeline*, TimedItem*);
+ static PassRefPtr<Player> create(DocumentTimeline&, TimedItem*);
// Returns whether this player is still current or in effect.
// timeToEffectChange returns:
@@ -60,7 +60,7 @@ public:
void setPlaybackRate(double);
double startTime() const { return m_startTime; }
double timeDrift() const;
- DocumentTimeline* timeline() { return m_timeline; }
+ DocumentTimeline& timeline() { return m_timeline; }
TimedItem* source() { return m_content.get(); }
// Pausing via this method is not reflected in the value returned by
@@ -70,7 +70,7 @@ public:
bool pausedInternal() const { return !isNull(m_pauseStartTime); }
private:
- Player(DocumentTimeline*, TimedItem*);
+ Player(DocumentTimeline&, TimedItem*);
static double effectiveTime(double time) { return isNull(time) ? 0 : time; }
inline double pausedTimeDrift() const;
inline double currentTimeBeforeDrift() const;
@@ -83,7 +83,7 @@ private:
const double m_startTime;
RefPtr<TimedItem> m_content;
- DocumentTimeline* const m_timeline;
+ DocumentTimeline& m_timeline;
bool m_isPausedForTesting;
};
« no previous file with comments | « Source/core/animation/DocumentTimeline.cpp ('k') | Source/core/animation/Player.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698