Chromium Code Reviews| Index: ash/common/system/tray/tray_background_view.cc |
| diff --git a/ash/common/system/tray/tray_background_view.cc b/ash/common/system/tray/tray_background_view.cc |
| index 8884948369ebfe1982dc0f33ddc6589f92eee130..e35b85cc2ac164cf111df2f3406b1f4e44f1e5eb 100644 |
| --- a/ash/common/system/tray/tray_background_view.cc |
| +++ b/ash/common/system/tray/tray_background_view.cc |
| @@ -35,6 +35,7 @@ |
| #include "ui/gfx/transform.h" |
| #include "ui/views/animation/flood_fill_ink_drop_ripple.h" |
| #include "ui/views/animation/ink_drop_highlight.h" |
| +#include "ui/views/animation/ink_drop_mask.h" |
| #include "ui/views/background.h" |
| #include "ui/views/layout/box_layout.h" |
| #include "ui/wm/core/window_animations.h" |
| @@ -376,6 +377,22 @@ void TrayBackgroundView::AboutToRequestFocusFromTabTraversal(bool reverse) { |
| v->AboutToRequestFocusFromTabTraversal(reverse); |
| } |
| +void TrayBackgroundView::AddInkDropLayer(ui::Layer* ink_drop_layer) { |
| + gfx::Rect local_bounds = GetLocalBounds(); |
| + ink_drop_layer->SetBounds(local_bounds); |
|
bruthig
2016/11/11 20:16:43
Capturing offline discussion:
Let's move the owner
mohsen
2016/11/13 23:31:28
Done.
|
| + ink_drop_mask_.reset(new views::RoundRectInkDropMask( |
| + local_bounds, GetBackgroundBounds(GetContentsBounds(), shelf_alignment_), |
| + kTrayRoundedBorderRadius)); |
| + ink_drop_layer->SetMaskLayer(ink_drop_mask_->layer()); |
| + ActionableView::AddInkDropLayer(ink_drop_layer); |
| +} |
| + |
| +void TrayBackgroundView::RemoveInkDropLayer(ui::Layer* ink_drop_layer) { |
| + ActionableView::RemoveInkDropLayer(ink_drop_layer); |
| + ink_drop_layer->SetMaskLayer(nullptr); |
| + ink_drop_mask_.reset(); |
| +} |
| + |
| std::unique_ptr<views::InkDropRipple> TrayBackgroundView::CreateInkDropRipple() |
| const { |
| return base::MakeUnique<views::FloodFillInkDropRipple>( |