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

Unified Diff: Source/core/inspector/InspectorAnimationAgent.h

Issue 620783002: Devtools Animations: Basic animation inspection & control in Styles pane (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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/core.gypi ('k') | Source/core/inspector/InspectorAnimationAgent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorAnimationAgent.h
diff --git a/Source/core/inspector/InspectorAnimationAgent.h b/Source/core/inspector/InspectorAnimationAgent.h
new file mode 100644
index 0000000000000000000000000000000000000000..5f0fcb63a68320888866bc05f7999ef3ffe82efe
--- /dev/null
+++ b/Source/core/inspector/InspectorAnimationAgent.h
@@ -0,0 +1,59 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef InspectorAnimationAgent_h
+#define InspectorAnimationAgent_h
+
+#include "core/InspectorFrontend.h"
+#include "core/inspector/InspectorBaseAgent.h"
+#include "wtf/PassOwnPtr.h"
+#include "wtf/text/WTFString.h"
+
+namespace blink {
+
+class AnimationNode;
+class AnimationPlayer;
+class InspectorDOMAgent;
+
+class InspectorAnimationAgent final : public InspectorBaseAgent<InspectorAnimationAgent>, public InspectorBackendDispatcher::AnimationCommandHandler {
+ WTF_MAKE_NONCOPYABLE(InspectorAnimationAgent);
+public:
+ static PassOwnPtrWillBeRawPtr<InspectorAnimationAgent> create(InspectorDOMAgent* domAgent)
+ {
+ return adoptPtrWillBeNoop(new InspectorAnimationAgent(domAgent));
+ }
+
+ // Base agent methods.
+ virtual void setFrontend(InspectorFrontend*) override;
+ virtual void clearFrontend() override;
+ void reset();
+
+ // Protocol method implementations.
+ virtual void getAnimationPlayersForNode(ErrorString*, int nodeId, RefPtr<TypeBuilder::Array<TypeBuilder::Animation::AnimationPlayer> >& animationPlayersArray) override;
+ virtual void pauseAnimationPlayer(ErrorString*, const String& id, RefPtr<TypeBuilder::Animation::AnimationPlayer>&) override;
+ virtual void playAnimationPlayer(ErrorString*, const String& id, RefPtr<TypeBuilder::Animation::AnimationPlayer>&) override;
+ virtual void setAnimationPlayerCurrentTime(ErrorString*, const String& id, double currentTime, RefPtr<TypeBuilder::Animation::AnimationPlayer>&) override;
+ virtual void getAnimationPlayerState(ErrorString*, const String& id, double* currentTime, bool* isRunning) override;
+
+ // Methods for other agents to use.
+ AnimationPlayer* assertAnimationPlayer(ErrorString*, const String& id);
+
+ virtual void trace(Visitor*) override;
+
+private:
+ InspectorAnimationAgent(InspectorDOMAgent*);
+
+ String playerId(AnimationPlayer&);
+
+ PassRefPtr<TypeBuilder::Animation::AnimationPlayer> buildObjectForAnimationPlayer(AnimationPlayer&);
+ PassRefPtr<TypeBuilder::Animation::AnimationNode> buildObjectForAnimationNode(AnimationNode&);
+
+ RawPtrWillBeMember<InspectorDOMAgent> m_domAgent;
+ InspectorFrontend::Animation* m_frontend;
+ WillBeHeapHashMap<String, RefPtrWillBeMember<AnimationPlayer> > m_idToAnimationPlayer;
+};
+
+}
+
+#endif // InspectorAnimationAgent_h
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/inspector/InspectorAnimationAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698