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

Side by Side Diff: chrome/browser/android/vr_shell/ui_scene.cc

Issue 2696293002: Adds in-out easing type. (Closed)
Patch Set: Created 3 years, 10 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "chrome/browser/android/vr_shell/ui_scene.h" 5 #include "chrome/browser/android/vr_shell/ui_scene.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 CHECK(dict.GetDouble("pow", &pow)); 167 CHECK(dict.GetDouble("pow", &pow));
168 result.reset(new easing::EaseIn(pow)); 168 result.reset(new easing::EaseIn(pow));
169 break; 169 break;
170 } 170 }
171 case easing::EasingType::EASEOUT: { 171 case easing::EasingType::EASEOUT: {
172 double pow; 172 double pow;
173 CHECK(dict.GetDouble("pow", &pow)); 173 CHECK(dict.GetDouble("pow", &pow));
174 result.reset(new easing::EaseOut(pow)); 174 result.reset(new easing::EaseOut(pow));
175 break; 175 break;
176 } 176 }
177 case easing::EasingType::EASEINOUT: {
178 double pow;
179 CHECK(dict.GetDouble("pow", &pow));
180 result.reset(new easing::EaseInOut(pow));
cjgrant 2017/02/16 15:10:25 Consider moving this function (or file!) to use:
tiborg 2017/02/16 18:39:33 Done.
181 break;
182 }
177 } 183 }
178 return result; 184 return result;
179 } 185 }
180 186
181 void ApplyAnchoring(const ContentRectangle& parent, XAnchoring x_anchoring, 187 void ApplyAnchoring(const ContentRectangle& parent, XAnchoring x_anchoring,
182 YAnchoring y_anchoring, ReversibleTransform* transform) { 188 YAnchoring y_anchoring, ReversibleTransform* transform) {
183 // To anchor a child, use the parent's size to find its edge. 189 // To anchor a child, use the parent's size to find its edge.
184 float x_offset; 190 float x_offset;
185 switch (x_anchoring) { 191 switch (x_anchoring) {
186 case XLEFT: 192 case XLEFT:
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 content_element_ = element; 489 content_element_ = element;
484 break; 490 break;
485 default: 491 default:
486 element->fill = Fill::NONE; 492 element->fill = Fill::NONE;
487 break; 493 break;
488 } 494 }
489 } 495 }
490 } 496 }
491 497
492 } // namespace vr_shell 498 } // namespace vr_shell
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698