Commit 9d707a72 authored by Sammie Quon's avatar Sammie Quon Committed by Commit Bot

cros: Remove ink drop masks.

NotificationMD already had a clip installed previously, so the mask code
was never called, so its safe to just delete.

ScrollArrowView has only one override ScrollableScrollArrowView which
turns of ink drop ripples and highlights, so its safe to remove the ink
drop codes.

Test: manual
Bug: 1056490
Change-Id: I3e4b068f3e819901b1da7d4ab42bc74e62a0295f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2308450Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Reviewed-by: default avatarTim Song <tengs@chromium.org>
Commit-Queue: Sammie Quon <sammiequon@chromium.org>
Cr-Commit-Position: refs/heads/master@{#790134}
parent 195284ab
...@@ -11,8 +11,6 @@ ...@@ -11,8 +11,6 @@
#include "ui/gfx/canvas.h" #include "ui/gfx/canvas.h"
#include "ui/gfx/image/image_skia_operations.h" #include "ui/gfx/image/image_skia_operations.h"
#include "ui/gfx/paint_vector_icon.h" #include "ui/gfx/paint_vector_icon.h"
#include "ui/views/animation/flood_fill_ink_drop_ripple.h"
#include "ui/views/animation/ink_drop_mask.h"
namespace ash { namespace ash {
...@@ -56,20 +54,4 @@ const char* ScrollArrowView::GetClassName() const { ...@@ -56,20 +54,4 @@ const char* ScrollArrowView::GetClassName() const {
return "ScrollArrowView"; return "ScrollArrowView";
} }
std::unique_ptr<views::InkDropMask> ScrollArrowView::CreateInkDropMask() const {
gfx::Point center_point = gfx::Rect(size()).CenterPoint();
return std::make_unique<views::CircleInkDropMask>(size(), center_point,
width() / 2);
}
std::unique_ptr<views::InkDropRipple> ScrollArrowView::CreateInkDropRipple()
const {
gfx::Rect bounds = gfx::Rect(size());
return std::make_unique<views::FloodFillInkDropRipple>(
size(), GetLocalBounds().InsetsFrom(bounds),
GetInkDropCenterBasedOnLastEvent(),
ShelfConfig::Get()->shelf_ink_drop_base_color(),
ShelfConfig::Get()->shelf_ink_drop_visible_opacity());
}
} // namespace ash } // namespace ash
...@@ -32,10 +32,6 @@ class ASH_EXPORT ScrollArrowView : public ShelfButton { ...@@ -32,10 +32,6 @@ class ASH_EXPORT ScrollArrowView : public ShelfButton {
void PaintButtonContents(gfx::Canvas* canvas) override; void PaintButtonContents(gfx::Canvas* canvas) override;
const char* GetClassName() const override; const char* GetClassName() const override;
// views::InkDropHost:
std::unique_ptr<views::InkDropMask> CreateInkDropMask() const override;
std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override;
private: private:
ArrowType arrow_type_ = kLeft; ArrowType arrow_type_ = kLeft;
bool is_horizontal_alignment_ = true; bool is_horizontal_alignment_ = true;
......
...@@ -41,7 +41,6 @@ ...@@ -41,7 +41,6 @@
#include "ui/views/animation/flood_fill_ink_drop_ripple.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_highlight.h"
#include "ui/views/animation/ink_drop_impl.h" #include "ui/views/animation/ink_drop_impl.h"
#include "ui/views/animation/ink_drop_mask.h"
#include "ui/views/background.h" #include "ui/views/background.h"
#include "ui/views/border.h" #include "ui/views/border.h"
#include "ui/views/controls/button/image_button.h" #include "ui/views/controls/button/image_button.h"
...@@ -1463,11 +1462,6 @@ std::vector<views::View*> NotificationViewMD::GetChildrenForLayerAdjustment() ...@@ -1463,11 +1462,6 @@ std::vector<views::View*> NotificationViewMD::GetChildrenForLayerAdjustment()
settings_done_button_}; settings_done_button_};
} }
std::unique_ptr<views::InkDropMask> NotificationViewMD::CreateInkDropMask()
const {
return nullptr;
}
SkColor NotificationViewMD::GetInkDropBaseColor() const { SkColor NotificationViewMD::GetInkDropBaseColor() const {
return GetNativeTheme()->GetSystemColor( return GetNativeTheme()->GetSystemColor(
ui::NativeTheme::kColorId_NotificationInlineSettingsBackground); ui::NativeTheme::kColorId_NotificationInlineSettingsBackground);
......
...@@ -182,7 +182,6 @@ class MESSAGE_CENTER_EXPORT NotificationViewMD ...@@ -182,7 +182,6 @@ class MESSAGE_CENTER_EXPORT NotificationViewMD
void PreferredSizeChanged() override; void PreferredSizeChanged() override;
std::unique_ptr<views::InkDrop> CreateInkDrop() override; std::unique_ptr<views::InkDrop> CreateInkDrop() override;
std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override; std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override;
std::unique_ptr<views::InkDropMask> CreateInkDropMask() const override;
SkColor GetInkDropBaseColor() const override; SkColor GetInkDropBaseColor() const override;
void UpdateWithNotification(const Notification& notification) override; void UpdateWithNotification(const Notification& notification) override;
void ButtonPressed(views::Button* sender, const ui::Event& event) override; void ButtonPressed(views::Button* sender, const ui::Event& event) override;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment