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

Unified Diff: ui/views/controls/button/custom_button.cc

Issue 2034963002: Rename InkDropHover to InkDropHighlight (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: relative patchset Created 4 years, 7 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
Index: ui/views/controls/button/custom_button.cc
diff --git a/ui/views/controls/button/custom_button.cc b/ui/views/controls/button/custom_button.cc
index 63b39a52cde369cf4580498926d4e1d49e75a11e..50d87cf317c5dc5daf9fc43a690069a7b6294058 100644
--- a/ui/views/controls/button/custom_button.cc
+++ b/ui/views/controls/button/custom_button.cc
@@ -13,7 +13,7 @@
#include "ui/gfx/color_palette.h"
#include "ui/native_theme/native_theme.h"
#include "ui/views/animation/ink_drop_delegate.h"
-#include "ui/views/animation/ink_drop_hover.h"
+#include "ui/views/animation/ink_drop_highlight.h"
#include "ui/views/controls/button/blue_button.h"
#include "ui/views/controls/button/checkbox.h"
#include "ui/views/controls/button/image_button.h"
@@ -346,8 +346,9 @@ void CustomButton::VisibilityChanged(View* starting_from, bool visible) {
SetState(visible && ShouldEnterHoveredState() ? STATE_HOVERED : STATE_NORMAL);
}
-std::unique_ptr<InkDropHover> CustomButton::CreateInkDropHover() const {
- return ShouldShowInkDropHover() ? Button::CreateInkDropHover() : nullptr;
+std::unique_ptr<InkDropHighlight> CustomButton::CreateInkDropHighlight() const {
+ return ShouldShowInkDropHighlight() ? Button::CreateInkDropHighlight()
+ : nullptr;
}
SkColor CustomButton::GetInkDropBaseColor() const {
@@ -413,7 +414,7 @@ bool CustomButton::ShouldEnterPushedState(const ui::Event& event) {
return IsTriggerableEvent(event);
}
-bool CustomButton::ShouldShowInkDropHover() const {
+bool CustomButton::ShouldShowInkDropHighlight() const {
return enabled() && !InDrag() &&
(IsMouseHovered() || (ShouldShowInkDropForFocus() && HasFocus()));
}

Powered by Google App Engine
This is Rietveld 408576698