Chromium Code Reviews| Index: ash/common/system/tray/actionable_view.cc |
| diff --git a/ash/common/system/tray/actionable_view.cc b/ash/common/system/tray/actionable_view.cc |
| index b53f49f31e11e809af21ee48a5ef969971059c69..77c7433d637763f6b62a54cf60fa9348386314e5 100644 |
| --- a/ash/common/system/tray/actionable_view.cc |
| +++ b/ash/common/system/tray/actionable_view.cc |
| @@ -10,6 +10,7 @@ |
| #include "ash/common/system/tray/tray_constants.h" |
| #include "ui/accessibility/ax_view_state.h" |
| #include "ui/gfx/canvas.h" |
| +#include "ui/gfx/geometry/rect_f.h" |
| #include "ui/views/animation/flood_fill_ink_drop_ripple.h" |
| #include "ui/views/animation/ink_drop_highlight.h" |
| @@ -22,6 +23,7 @@ ActionableView::ActionableView(SystemTrayItem* owner) |
| : views::CustomButton(this), destroyed_(nullptr), owner_(owner) { |
| SetFocusBehavior(FocusBehavior::ALWAYS); |
| set_has_ink_drop_action_on_click(false); |
| + set_notify_enter_exit_on_child(true); |
|
tdanderson
2016/11/01 19:49:18
Should this be gated behind IsSystemTrayMenuMateri
bruthig
2016/11/01 21:10:54
It shouldn't affect non-md. The only ActionableVi
tdanderson
2016/11/01 21:53:54
Acknowledged.
|
| } |
| ActionableView::~ActionableView() { |
| @@ -78,6 +80,23 @@ void ActionableView::OnBlur() { |
| SchedulePaint(); |
| } |
| +std::unique_ptr<views::InkDropRipple> ActionableView::CreateInkDropRipple() |
| + const { |
| + return base::MakeUnique<views::FloodFillInkDropRipple>( |
| + GetLocalBounds(), GetInkDropCenterBasedOnLastEvent(), |
| + kTrayPopupInkDropBaseColor, kTrayPopupInkDropRippleOpacity); |
| +} |
| + |
| +std::unique_ptr<views::InkDropHighlight> |
| +ActionableView::CreateInkDropHighlight() const { |
| + std::unique_ptr<views::InkDropHighlight> highlight( |
| + new views::InkDropHighlight(size(), 0, |
| + gfx::RectF(GetLocalBounds()).CenterPoint(), |
| + kTrayPopupInkDropBaseColor)); |
| + highlight->set_visible_opacity(kTrayPopupInkDropHighlightOpacity); |
| + return highlight; |
| +} |
| + |
| void ActionableView::CloseSystemBubble() { |
| DCHECK(owner_); |
| owner_->system_tray()->CloseSystemBubble(); |