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

Side by Side Diff: chrome/browser/ui/views/payments/view_stack.h

Issue 2942943002: [WebPayments] Setting hidden views in view stack invisible (Closed)
Patch Set: anthony feedback 2 Created 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/views/payments/view_stack.cc » ('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 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 <vector> 8 #include <vector>
9 9
10 #include "ui/views/view.h" 10 #include "ui/views/view.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 FRIEND_TEST_ALL_PREFIXES(ViewStackTest, TestDeletingViewCleansUpState); 54 FRIEND_TEST_ALL_PREFIXES(ViewStackTest, TestDeletingViewCleansUpState);
55 FRIEND_TEST_ALL_PREFIXES(ViewStackTest, TestInitialStateAddedAsChildView); 55 FRIEND_TEST_ALL_PREFIXES(ViewStackTest, TestInitialStateAddedAsChildView);
56 FRIEND_TEST_ALL_PREFIXES(ViewStackTest, TestPushStateAddsViewToChildren); 56 FRIEND_TEST_ALL_PREFIXES(ViewStackTest, TestPushStateAddsViewToChildren);
57 FRIEND_TEST_ALL_PREFIXES(ViewStackTest, TestLayoutUpdatesAnimations); 57 FRIEND_TEST_ALL_PREFIXES(ViewStackTest, TestLayoutUpdatesAnimations);
58 friend class ViewStackTest; 58 friend class ViewStackTest;
59 friend class payments::PaymentRequestBrowserTestBase; 59 friend class payments::PaymentRequestBrowserTestBase;
60 60
61 // Returns the top state of the stack, used in tests. 61 // Returns the top state of the stack, used in tests.
62 views::View* top() { return stack_.back().get(); } 62 views::View* top() { return stack_.back().get(); }
63 63
64 // Marks all views, except the topmost, as invisible.
65 void HideCoveredViews();
66
64 void UpdateAnimatorBounds( 67 void UpdateAnimatorBounds(
65 views::BoundsAnimator* animator, const gfx::Rect& target); 68 views::BoundsAnimator* animator, const gfx::Rect& target);
66 69
67 // views::BoundsAnimatorObserver: 70 // views::BoundsAnimatorObserver:
68 void OnBoundsAnimatorProgressed(views::BoundsAnimator* animator) override {} 71 void OnBoundsAnimatorProgressed(views::BoundsAnimator* animator) override {}
69 void OnBoundsAnimatorDone(views::BoundsAnimator* animator) override; 72 void OnBoundsAnimatorDone(views::BoundsAnimator* animator) override;
70 73
71 std::unique_ptr<views::BoundsAnimator> slide_in_animator_; 74 std::unique_ptr<views::BoundsAnimator> slide_in_animator_;
72 std::unique_ptr<views::BoundsAnimator> slide_out_animator_; 75 std::unique_ptr<views::BoundsAnimator> slide_out_animator_;
73 76
74 // Should be the last member, because views need to be destroyed before other 77 // Should be the last member, because views need to be destroyed before other
75 // members, and members are destroyed in reverse order of their creation. 78 // members, and members are destroyed in reverse order of their creation.
76 std::vector<std::unique_ptr<views::View>> stack_; 79 std::vector<std::unique_ptr<views::View>> stack_;
77 80
78 DISALLOW_COPY_AND_ASSIGN(ViewStack); 81 DISALLOW_COPY_AND_ASSIGN(ViewStack);
79 }; 82 };
80 83
81 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_VIEW_STACK_H_ 84 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_VIEW_STACK_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/payments/view_stack.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698