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

Side by Side Diff: services/ui/ws/scheduled_animation_group.cc

Issue 2179273002: Mojo C++ bindings: support mapping T and T? differently. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « services/ui/public/cpp/tests/test_window_tree.cc ('k') | services/ui/ws/window_tree.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "services/ui/ws/scheduled_animation_group.h" 5 #include "services/ui/ws/scheduled_animation_group.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "services/ui/ws/server_window.h" 9 #include "services/ui/ws/server_window.h"
10 10
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 return gfx::Tween::EASE_OUT; 82 return gfx::Tween::EASE_OUT;
83 case mojom::AnimationTweenType::EASE_IN_OUT: 83 case mojom::AnimationTweenType::EASE_IN_OUT:
84 return gfx::Tween::EASE_IN_OUT; 84 return gfx::Tween::EASE_IN_OUT;
85 } 85 }
86 return gfx::Tween::LINEAR; 86 return gfx::Tween::LINEAR;
87 } 87 }
88 88
89 void ConvertToScheduledValue(const mojom::AnimationValue& transport_value, 89 void ConvertToScheduledValue(const mojom::AnimationValue& transport_value,
90 ScheduledAnimationValue* value) { 90 ScheduledAnimationValue* value) {
91 value->float_value = transport_value.float_value; 91 value->float_value = transport_value.float_value;
92 value->transform = transport_value.transform; 92 value->transform =
93 transport_value.transform ? *transport_value.transform : gfx::Transform();
93 } 94 }
94 95
95 void ConvertToScheduledElement(const mojom::AnimationElement& transport_element, 96 void ConvertToScheduledElement(const mojom::AnimationElement& transport_element,
96 ScheduledAnimationElement* element) { 97 ScheduledAnimationElement* element) {
97 element->property = transport_element.property; 98 element->property = transport_element.property;
98 element->duration = 99 element->duration =
99 base::TimeDelta::FromMicroseconds(transport_element.duration); 100 base::TimeDelta::FromMicroseconds(transport_element.duration);
100 element->tween_type = AnimationTypeToTweenType(transport_element.tween_type); 101 element->tween_type = AnimationTypeToTweenType(transport_element.tween_type);
101 if (transport_element.property != AnimationProperty::NONE) { 102 if (transport_element.property != AnimationProperty::NONE) {
102 if (transport_element.start_value.get()) { 103 if (transport_element.start_value.get()) {
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 return sequences_.empty(); 348 return sequences_.empty();
348 } 349 }
349 350
350 ScheduledAnimationGroup::ScheduledAnimationGroup(ServerWindow* window, 351 ScheduledAnimationGroup::ScheduledAnimationGroup(ServerWindow* window,
351 uint32_t id, 352 uint32_t id,
352 base::TimeTicks time_scheduled) 353 base::TimeTicks time_scheduled)
353 : window_(window), id_(id), time_scheduled_(time_scheduled) {} 354 : window_(window), id_(id), time_scheduled_(time_scheduled) {}
354 355
355 } // namespace ws 356 } // namespace ws
356 } // namespace ui 357 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/public/cpp/tests/test_window_tree.cc ('k') | services/ui/ws/window_tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698