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

Unified Diff: components/mus/public/interfaces/animations.mojom

Issue 2072573002: Basic support for animating window properties in Mus. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@launcher_controller_mus_mus_3
Patch Set: Replacing .empty() with .size() == 0 to account for is_null case in mojo::Array. Created 4 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 | « components/mus/public/interfaces/BUILD.gn ('k') | components/mus/ws/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/public/interfaces/animations.mojom
diff --git a/components/mus/public/interfaces/animations.mojom b/components/mus/public/interfaces/animations.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..847b406ed0d1524bfa07c026df8b44561ced8283
--- /dev/null
+++ b/components/mus/public/interfaces/animations.mojom
@@ -0,0 +1,61 @@
+// Copyright 2016 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.
+
+module mus.mojom;
+
+import "ui/gfx/mojo/transform.mojom";
+
+enum AnimationTweenType {
+ LINEAR,
+ EASE_IN,
+ EASE_OUT,
+ EASE_IN_OUT,
+};
+
+enum AnimationProperty {
+ // Used for pausing.
+ NONE,
+ OPACITY,
+ TRANSFORM,
+};
+
+struct AnimationValue {
+ float float_value;
+ gfx.mojom.Transform? transform;
+};
+
+// Identifies how a particular property should be animated between a start and
+// target value.
+struct AnimationElement {
+ AnimationProperty property;
+
+ // Duration is in microseconds.
+ int64 duration;
+
+ AnimationTweenType tween_type;
+
+ // If not specified the start value is taken from either the current value
+ // (for the first element) or the target_value of the previous element.
+ AnimationValue? start_value;
+
+ // target_value may be null when property is NONE.
+ AnimationValue? target_value;
+};
+
+// An AnimationSequence consists of a number of AnimationElements to animate.
+// Each element is animated serially.
+struct AnimationSequence {
+ // Number of times to run the sequence. Value of 0 means run until
+ // explicitly stopped.
+ uint32 cycle_count;
+
+ array<AnimationElement> elements;
+};
+
+// AnimationGroup identifies a window and a set of AnimationSequences to apply
+// to the window. Each sequence is run in parallel.
+struct AnimationGroup {
+ uint32 window_id;
+ array<AnimationSequence> sequences;
+};
« no previous file with comments | « components/mus/public/interfaces/BUILD.gn ('k') | components/mus/ws/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698