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

Unified Diff: ui/views/animation/ink_drop_animation.cc

Issue 1724963002: Color the ink drop ripple and hover effects based on theming. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sky review Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/animation/ink_drop_animation.h ('k') | ui/views/animation/ink_drop_animation_controller_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/animation/ink_drop_animation.cc
diff --git a/ui/views/animation/ink_drop_animation.cc b/ui/views/animation/ink_drop_animation.cc
index a7a65a6c127fb4e9189b8555bf48acf302127dab..111e910fa56abb98d16dcb883fe1e7601e43a932 100644
--- a/ui/views/animation/ink_drop_animation.cc
+++ b/ui/views/animation/ink_drop_animation.cc
@@ -7,30 +7,21 @@
namespace views {
const float InkDropAnimation::kHiddenOpacity = 0.f;
-const float InkDropAnimation::kVisibleOpacity = 0.11f;
+const float InkDropAnimation::kVisibleOpacity = 0.175f;
-InkDropAnimation::InkDropAnimation() {}
+InkDropAnimation::InkDropAnimation() : observer_(nullptr) {}
InkDropAnimation::~InkDropAnimation() {}
-void InkDropAnimation::AddObserver(InkDropAnimationObserver* observer) {
- observers_.AddObserver(observer);
-}
-
-void InkDropAnimation::RemoveObserver(InkDropAnimationObserver* observer) {
- observers_.RemoveObserver(observer);
-}
-
void InkDropAnimation::NotifyAnimationStarted(InkDropState ink_drop_state) {
- FOR_EACH_OBSERVER(InkDropAnimationObserver, observers_,
- InkDropAnimationStarted(ink_drop_state));
+ observer_->InkDropAnimationStarted(ink_drop_state);
}
void InkDropAnimation::NotifyAnimationEnded(
InkDropState ink_drop_state,
InkDropAnimationObserver::InkDropAnimationEndedReason reason) {
- FOR_EACH_OBSERVER(InkDropAnimationObserver, observers_,
- InkDropAnimationEnded(ink_drop_state, reason));
+ observer_->InkDropAnimationEnded(ink_drop_state, reason);
+ // |this| may be deleted!
}
} // namespace views
« no previous file with comments | « ui/views/animation/ink_drop_animation.h ('k') | ui/views/animation/ink_drop_animation_controller_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698