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

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

Issue 2720183002: [Views] Update ink drop for omnibox icons (Closed)
Patch Set: Refactored Created 3 years, 9 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 // InkDrop inherited functions. 65 // InkDrop inherited functions.
66 void SetAutoHighlightMode(AutoHighlightMode auto_highlight_mode); 66 void SetAutoHighlightMode(AutoHighlightMode auto_highlight_mode);
67 67
68 // InkDrop: 68 // InkDrop:
69 void HostSizeChanged(const gfx::Size& new_size) override; 69 void HostSizeChanged(const gfx::Size& new_size) override;
70 InkDropState GetTargetInkDropState() const override; 70 InkDropState GetTargetInkDropState() const override;
71 void AnimateToState(InkDropState ink_drop_state) override; 71 void AnimateToState(InkDropState ink_drop_state) override;
72 void SnapToActivated() override; 72 void SnapToActivated() override;
73 void SetHovered(bool is_hovered) override; 73 void SetHovered(bool is_hovered) override;
74 void SetFocused(bool is_focused) override; 74 void SetFocused(bool is_focused) override;
75 bool IsHighlightFadingInOrVisible() const override;
75 76
76 private: 77 private:
77 friend class InkDropImplTest; 78 friend class InkDropImplTest;
78 friend class test::InkDropImplTestApi; 79 friend class test::InkDropImplTestApi;
79 80
80 // Forward declaration for use by the HighlightState class definition. 81 // Forward declaration for use by the HighlightState class definition.
81 class HighlightStateFactory; 82 class HighlightStateFactory;
82 83
83 // Base HighlightState defines functions to handle all state changes that may 84 // Base HighlightState defines functions to handle all state changes that may
84 // affect the highlight state. 85 // affect the highlight state.
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 void DestroyInkDropHighlight(); 216 void DestroyInkDropHighlight();
216 217
217 // Adds the |root_layer_| to the |ink_drop_host_| if it hasn't already been 218 // Adds the |root_layer_| to the |ink_drop_host_| if it hasn't already been
218 // added. 219 // added.
219 void AddRootLayerToHostIfNeeded(); 220 void AddRootLayerToHostIfNeeded();
220 221
221 // Removes the |root_layer_| from the |ink_drop_host_| if no ink drop ripple 222 // Removes the |root_layer_| from the |ink_drop_host_| if no ink drop ripple
222 // or highlight is active. 223 // or highlight is active.
223 void RemoveRootLayerFromHostIfNeeded(); 224 void RemoveRootLayerFromHostIfNeeded();
224 225
225 // Returns true if the highlight animation is in the process of fading in or
226 // is visible.
227 bool IsHighlightFadingInOrVisible() const;
228
229 // views::InkDropRippleObserver: 226 // views::InkDropRippleObserver:
230 void AnimationStarted(InkDropState ink_drop_state) override; 227 void AnimationStarted(InkDropState ink_drop_state) override;
231 void AnimationEnded(InkDropState ink_drop_state, 228 void AnimationEnded(InkDropState ink_drop_state,
232 InkDropAnimationEndedReason reason) override; 229 InkDropAnimationEndedReason reason) override;
233 230
234 // views::InkDropHighlightObserver: 231 // views::InkDropHighlightObserver:
235 void AnimationStarted( 232 void AnimationStarted(
236 InkDropHighlight::AnimationType animation_type) override; 233 InkDropHighlight::AnimationType animation_type) override;
237 void AnimationEnded(InkDropHighlight::AnimationType animation_type, 234 void AnimationEnded(InkDropHighlight::AnimationType animation_type,
238 InkDropAnimationEndedReason reason) override; 235 InkDropAnimationEndedReason reason) override;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 308
312 // Used to fail DCHECKS to catch unexpected behavior during tear down. 309 // Used to fail DCHECKS to catch unexpected behavior during tear down.
313 bool destroying_; 310 bool destroying_;
314 311
315 DISALLOW_COPY_AND_ASSIGN(InkDropImpl); 312 DISALLOW_COPY_AND_ASSIGN(InkDropImpl);
316 }; 313 };
317 314
318 } // namespace views 315 } // namespace views
319 316
320 #endif // UI_VIEWS_ANIMATION_INK_DROP_IMPL_H_ 317 #endif // UI_VIEWS_ANIMATION_INK_DROP_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698