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

Side by Side Diff: ui/views/animation/ink_drop_impl.h

Issue 2001843002: Use ink drop hover for focus states on toolbar buttons and location (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix tests 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 UI_VIEWS_ANIMATION_INK_DROP_IMPL_H_ 5 #ifndef UI_VIEWS_ANIMATION_INK_DROP_IMPL_H_
6 #define UI_VIEWS_ANIMATION_INK_DROP_IMPL_H_ 6 #define UI_VIEWS_ANIMATION_INK_DROP_IMPL_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 27 matching lines...) Expand all
38 // |ink_drop_host|. 38 // |ink_drop_host|.
39 explicit InkDropImpl(InkDropHost* ink_drop_host); 39 explicit InkDropImpl(InkDropHost* ink_drop_host);
40 ~InkDropImpl() override; 40 ~InkDropImpl() override;
41 41
42 // InkDrop: 42 // InkDrop:
43 InkDropState GetTargetInkDropState() const override; 43 InkDropState GetTargetInkDropState() const override;
44 bool IsVisible() const override; 44 bool IsVisible() const override;
45 void AnimateToState(InkDropState ink_drop_state) override; 45 void AnimateToState(InkDropState ink_drop_state) override;
46 void SnapToActivated() override; 46 void SnapToActivated() override;
47 void SetHovered(bool is_hovered) override; 47 void SetHovered(bool is_hovered) override;
48 void SnapToHovered(bool is_hovered) override;
48 49
49 private: 50 private:
50 friend class test::InkDropImplTestApi; 51 friend class test::InkDropImplTestApi;
51 52
52 // Destroys |ink_drop_ripple_| if it's targeted to the HIDDEN state. 53 // Destroys |ink_drop_ripple_| if it's targeted to the HIDDEN state.
53 void DestroyHiddenTargetedAnimations(); 54 void DestroyHiddenTargetedAnimations();
54 55
55 // Creates a new InkDropRipple and sets it to |ink_drop_ripple_|. If 56 // Creates a new InkDropRipple and sets it to |ink_drop_ripple_|. If
56 // |ink_drop_ripple_| wasn't null then it will be destroyed using 57 // |ink_drop_ripple_| wasn't null then it will be destroyed using
57 // DestroyInkDropRipple(). 58 // DestroyInkDropRipple().
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 // The timer used to delay the hover fade in after an ink drop ripple 133 // The timer used to delay the hover fade in after an ink drop ripple
133 // animation. 134 // animation.
134 std::unique_ptr<base::Timer> hover_after_ripple_timer_; 135 std::unique_ptr<base::Timer> hover_after_ripple_timer_;
135 136
136 DISALLOW_COPY_AND_ASSIGN(InkDropImpl); 137 DISALLOW_COPY_AND_ASSIGN(InkDropImpl);
137 }; 138 };
138 139
139 } // namespace views 140 } // namespace views
140 141
141 #endif // UI_VIEWS_ANIMATION_INK_DROP_IMPL_H_ 142 #endif // UI_VIEWS_ANIMATION_INK_DROP_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698