Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_VIEW_STACK_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_VIEW_STACK_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_VIEW_STACK_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_VIEW_STACK_H_ |
| 7 | 7 |
| 8 #include "ui/views/view.h" | 8 #include "ui/views/view.h" |
| 9 #include "ui/views/animation/bounds_animator.h" | 9 #include "ui/views/animation/bounds_animator.h" |
| 10 #include "ui/views/animation/bounds_animator_observer.h" | 10 #include "ui/views/animation/bounds_animator_observer.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 52 // Returns the top state of the stack, used in tests. | 52 // Returns the top state of the stack, used in tests. |
| 53 views::View* top() { return stack_.back().get(); } | 53 views::View* top() { return stack_.back().get(); } |
| 54 | 54 |
| 55 void UpdateAnimatorBounds( | 55 void UpdateAnimatorBounds( |
| 56 views::BoundsAnimator* animator, const gfx::Rect& target); | 56 views::BoundsAnimator* animator, const gfx::Rect& target); |
| 57 | 57 |
| 58 // views::BoundsAnimatorObserver: | 58 // views::BoundsAnimatorObserver: |
| 59 void OnBoundsAnimatorProgressed(views::BoundsAnimator* animator) override {} | 59 void OnBoundsAnimatorProgressed(views::BoundsAnimator* animator) override {} |
| 60 void OnBoundsAnimatorDone(views::BoundsAnimator* animator) override; | 60 void OnBoundsAnimatorDone(views::BoundsAnimator* animator) override; |
| 61 | 61 |
| 62 std::vector<std::unique_ptr<views::View>> stack_; | |
| 63 | |
| 64 std::unique_ptr<views::BoundsAnimator> slide_in_animator_; | 62 std::unique_ptr<views::BoundsAnimator> slide_in_animator_; |
| 65 std::unique_ptr<views::BoundsAnimator> slide_out_animator_; | 63 std::unique_ptr<views::BoundsAnimator> slide_out_animator_; |
| 66 | 64 |
| 65 std::vector<std::unique_ptr<views::View>> stack_; | |
|
Mathieu
2017/04/12 13:29:02
The order is important here, because views need to
anthonyvd
2017/04/12 14:19:36
Good catch, can you please add a comment about thi
Mathieu
2017/04/12 14:24:23
Done.
| |
| 66 | |
| 67 DISALLOW_COPY_AND_ASSIGN(ViewStack); | 67 DISALLOW_COPY_AND_ASSIGN(ViewStack); |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_VIEW_STACK_H_ | 70 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_VIEW_STACK_H_ |
| OLD | NEW |