Commit 9a0978eb authored by Tetsui Ohkubo's avatar Tetsui Ohkubo Committed by Commit Bot

Remove TrayPopupInkDropStyle from SystemMenuButton

This CL removes TrayPopupInkDropStyle from SystemMenuButton constructor,
because at all call sites TrayPopupInkDropStyle::HOST_CENTERED is given.

This CL also removes TrayPopupInkDropStyle from
TrayPopupUtils::CreateInkDrop, as it's unused.

BUG=none

Change-Id: I4168aa03ec2ee0a243eec3b8cb62f523b3d56711
Reviewed-on: https://chromium-review.googlesource.com/919924
Commit-Queue: Tetsui Ohkubo <tetsui@chromium.org>
Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#537176}
parent 2ae66f5e
...@@ -66,8 +66,7 @@ class MessageCenterButton : public views::ToggleImageButton { ...@@ -66,8 +66,7 @@ class MessageCenterButton : public views::ToggleImageButton {
} }
std::unique_ptr<views::InkDrop> CreateInkDrop() override { std::unique_ptr<views::InkDrop> CreateInkDrop() override {
return TrayPopupUtils::CreateInkDrop(TrayPopupInkDropStyle::HOST_CENTERED, return TrayPopupUtils::CreateInkDrop(this);
this);
} }
std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override { std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override {
......
...@@ -125,8 +125,7 @@ SystemMenuButton* CreateImeMenuButton(views::ButtonListener* listener, ...@@ -125,8 +125,7 @@ SystemMenuButton* CreateImeMenuButton(views::ButtonListener* listener,
const gfx::VectorIcon& icon, const gfx::VectorIcon& icon,
int accessible_name_id, int accessible_name_id,
int right_border) { int right_border) {
return new SystemMenuButton(listener, TrayPopupInkDropStyle::HOST_CENTERED, return new SystemMenuButton(listener, icon, accessible_name_id);
icon, accessible_name_id);
} }
// The view that contains IME menu title. // The view that contains IME menu title.
......
...@@ -473,8 +473,7 @@ class WifiHeaderRowView : public NetworkListView::SectionHeaderRowView { ...@@ -473,8 +473,7 @@ class WifiHeaderRowView : public NetworkListView::SectionHeaderRowView {
gfx::ImageSkia disabled_image = network_icon::GetImageForNewWifiNetwork( gfx::ImageSkia disabled_image = network_icon::GetImageForNewWifiNetwork(
SkColorSetA(prominent_color, kDisabledJoinIconAlpha), SkColorSetA(prominent_color, kDisabledJoinIconAlpha),
SkColorSetA(prominent_color, kDisabledJoinBadgeAlpha)); SkColorSetA(prominent_color, kDisabledJoinBadgeAlpha));
join_ = new SystemMenuButton(this, TrayPopupInkDropStyle::HOST_CENTERED, join_ = new SystemMenuButton(this, normal_image, disabled_image,
normal_image, disabled_image,
IDS_ASH_STATUS_TRAY_OTHER_WIFI); IDS_ASH_STATUS_TRAY_OTHER_WIFI);
join_->SetInkDropColor(prominent_color); join_->SetInkDropColor(prominent_color);
join_->SetEnabled(enabled); join_->SetEnabled(enabled);
......
...@@ -260,15 +260,13 @@ void NetworkStateListDetailedView::CreateExtraTitleRowButtons() { ...@@ -260,15 +260,13 @@ void NetworkStateListDetailedView::CreateExtraTitleRowButtons() {
DCHECK(!info_button_); DCHECK(!info_button_);
tri_view()->SetContainerVisible(TriView::Container::END, true); tri_view()->SetContainerVisible(TriView::Container::END, true);
info_button_ = new SystemMenuButton( info_button_ = new SystemMenuButton(this, kSystemMenuInfoIcon,
this, TrayPopupInkDropStyle::HOST_CENTERED, kSystemMenuInfoIcon, IDS_ASH_STATUS_TRAY_NETWORK_INFO);
IDS_ASH_STATUS_TRAY_NETWORK_INFO);
tri_view()->AddView(TriView::Container::END, info_button_); tri_view()->AddView(TriView::Container::END, info_button_);
DCHECK(!settings_button_); DCHECK(!settings_button_);
settings_button_ = new SystemMenuButton( settings_button_ = new SystemMenuButton(this, kSystemMenuSettingsIcon,
this, TrayPopupInkDropStyle::HOST_CENTERED, kSystemMenuSettingsIcon, IDS_ASH_STATUS_TRAY_NETWORK_SETTINGS);
IDS_ASH_STATUS_TRAY_NETWORK_SETTINGS);
tri_view()->AddView(TriView::Container::END, settings_button_); tri_view()->AddView(TriView::Container::END, settings_button_);
} }
......
...@@ -93,8 +93,7 @@ class VPNListProviderEntry : public views::ButtonListener, public views::View { ...@@ -93,8 +93,7 @@ class VPNListProviderEntry : public views::ButtonListener, public views::View {
gfx::ImageSkia icon = gfx::ImageSkia icon =
gfx::CreateVectorIcon(kSystemMenuAddConnectionIcon, image_color); gfx::CreateVectorIcon(kSystemMenuAddConnectionIcon, image_color);
SystemMenuButton* add_vpn_button = SystemMenuButton* add_vpn_button =
new SystemMenuButton(this, TrayPopupInkDropStyle::HOST_CENTERED, icon, new SystemMenuButton(this, icon, icon, button_accessible_name_id);
icon, button_accessible_name_id);
add_vpn_button->SetInkDropColor(image_color); add_vpn_button->SetInkDropColor(image_color);
add_vpn_button->SetEnabled(true); add_vpn_button->SetEnabled(true);
tri_view->AddView(TriView::Container::END, add_vpn_button); tri_view->AddView(TriView::Container::END, add_vpn_button);
......
...@@ -50,7 +50,6 @@ base::string16 GetNightLightTooltipText(bool night_light_enabled) { ...@@ -50,7 +50,6 @@ base::string16 GetNightLightTooltipText(bool night_light_enabled) {
NightLightToggleButton::NightLightToggleButton(views::ButtonListener* listener) NightLightToggleButton::NightLightToggleButton(views::ButtonListener* listener)
: SystemMenuButton(listener, : SystemMenuButton(listener,
TrayPopupInkDropStyle::HOST_CENTERED,
kSystemMenuNightLightOffIcon, kSystemMenuNightLightOffIcon,
IDS_ASH_STATUS_TRAY_NIGHT_LIGHT) { IDS_ASH_STATUS_TRAY_NIGHT_LIGHT) {
Update(); Update();
......
...@@ -98,12 +98,10 @@ class TitleView : public views::View, public views::ButtonListener { ...@@ -98,12 +98,10 @@ class TitleView : public views::View, public views::ButtonListener {
TrayPopupItemStyle style(TrayPopupItemStyle::FontStyle::TITLE); TrayPopupItemStyle style(TrayPopupItemStyle::FontStyle::TITLE);
style.SetupLabel(title_label); style.SetupLabel(title_label);
layout_ptr->SetFlexForView(title_label, 1); layout_ptr->SetFlexForView(title_label, 1);
help_button_ = help_button_ = new SystemMenuButton(this, kSystemMenuHelpIcon,
new SystemMenuButton(this, TrayPopupInkDropStyle::HOST_CENTERED, IDS_ASH_STATUS_TRAY_HELP);
kSystemMenuHelpIcon, IDS_ASH_STATUS_TRAY_HELP); settings_button_ = new SystemMenuButton(this, kSystemMenuSettingsIcon,
settings_button_ = IDS_ASH_PALETTE_SETTINGS);
new SystemMenuButton(this, TrayPopupInkDropStyle::HOST_CENTERED,
kSystemMenuSettingsIcon, IDS_ASH_PALETTE_SETTINGS);
AddChildView(help_button_); AddChildView(help_button_);
AddChildView(TrayPopupUtils::CreateVerticalSeparator()); AddChildView(TrayPopupUtils::CreateVerticalSeparator());
......
...@@ -67,16 +67,14 @@ void TilesDefaultView::Init() { ...@@ -67,16 +67,14 @@ void TilesDefaultView::Init() {
// |power_button_| which is always shown as enabled. // |power_button_| which is always shown as enabled.
const bool can_show_web_ui = TrayPopupUtils::CanOpenWebUISettings(); const bool can_show_web_ui = TrayPopupUtils::CanOpenWebUISettings();
settings_button_ = new SystemMenuButton( settings_button_ = new SystemMenuButton(this, kSystemMenuSettingsIcon,
this, TrayPopupInkDropStyle::HOST_CENTERED, kSystemMenuSettingsIcon, IDS_ASH_STATUS_TRAY_SETTINGS);
IDS_ASH_STATUS_TRAY_SETTINGS);
settings_button_->SetEnabled(can_show_web_ui); settings_button_->SetEnabled(can_show_web_ui);
AddChildView(settings_button_); AddChildView(settings_button_);
AddChildView(TrayPopupUtils::CreateVerticalSeparator()); AddChildView(TrayPopupUtils::CreateVerticalSeparator());
help_button_ = help_button_ =
new SystemMenuButton(this, TrayPopupInkDropStyle::HOST_CENTERED, new SystemMenuButton(this, kSystemMenuHelpIcon, IDS_ASH_STATUS_TRAY_HELP);
kSystemMenuHelpIcon, IDS_ASH_STATUS_TRAY_HELP);
if (base::i18n::IsRTL() && if (base::i18n::IsRTL() &&
base::i18n::GetConfiguredLocale() == kHebrewLocale) { base::i18n::GetConfiguredLocale() == kHebrewLocale) {
// The asset for the help button is a question mark '?'. Normally this asset // The asset for the help button is a question mark '?'. Normally this asset
...@@ -96,17 +94,15 @@ void TilesDefaultView::Init() { ...@@ -96,17 +94,15 @@ void TilesDefaultView::Init() {
} }
lock_button_ = lock_button_ =
new SystemMenuButton(this, TrayPopupInkDropStyle::HOST_CENTERED, new SystemMenuButton(this, kSystemMenuLockIcon, IDS_ASH_STATUS_TRAY_LOCK);
kSystemMenuLockIcon, IDS_ASH_STATUS_TRAY_LOCK);
lock_button_->SetEnabled(can_show_web_ui && lock_button_->SetEnabled(can_show_web_ui &&
Shell::Get()->session_controller()->CanLockScreen()); Shell::Get()->session_controller()->CanLockScreen());
AddChildView(lock_button_); AddChildView(lock_button_);
AddChildView(TrayPopupUtils::CreateVerticalSeparator()); AddChildView(TrayPopupUtils::CreateVerticalSeparator());
power_button_ = power_button_ = new SystemMenuButton(this, kSystemMenuPowerIcon,
new SystemMenuButton(this, TrayPopupInkDropStyle::HOST_CENTERED, IDS_ASH_STATUS_TRAY_SHUTDOWN);
kSystemMenuPowerIcon, IDS_ASH_STATUS_TRAY_SHUTDOWN);
AddChildView(power_button_); AddChildView(power_button_);
// This object is recreated every time the menu opens. Don't bother updating // This object is recreated every time the menu opens. Don't bother updating
// the tooltip if the shutdown policy changes while the menu is open. // the tooltip if the shutdown policy changes while the menu is open.
......
...@@ -68,7 +68,7 @@ void ActionableView::GetAccessibleNodeData(ui::AXNodeData* node_data) { ...@@ -68,7 +68,7 @@ void ActionableView::GetAccessibleNodeData(ui::AXNodeData* node_data) {
} }
std::unique_ptr<views::InkDrop> ActionableView::CreateInkDrop() { std::unique_ptr<views::InkDrop> ActionableView::CreateInkDrop() {
return TrayPopupUtils::CreateInkDrop(ink_drop_style_, this); return TrayPopupUtils::CreateInkDrop(this);
} }
std::unique_ptr<views::InkDropRipple> ActionableView::CreateInkDropRipple() std::unique_ptr<views::InkDropRipple> ActionableView::CreateInkDropRipple()
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include "ash/ash_constants.h" #include "ash/ash_constants.h"
#include "ash/system/tray/system_tray.h" #include "ash/system/tray/system_tray.h"
#include "ash/system/tray/tray_constants.h" #include "ash/system/tray/tray_constants.h"
#include "ash/system/tray/tray_popup_ink_drop_style.h"
#include "ash/system/tray/tray_popup_utils.h" #include "ash/system/tray/tray_popup_utils.h"
#include "ui/base/l10n/l10n_util.h" #include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/paint_vector_icon.h" #include "ui/gfx/paint_vector_icon.h"
...@@ -20,11 +21,10 @@ ...@@ -20,11 +21,10 @@
namespace ash { namespace ash {
SystemMenuButton::SystemMenuButton(views::ButtonListener* listener, SystemMenuButton::SystemMenuButton(views::ButtonListener* listener,
TrayPopupInkDropStyle ink_drop_style,
const gfx::ImageSkia& normal_icon, const gfx::ImageSkia& normal_icon,
const gfx::ImageSkia& disabled_icon, const gfx::ImageSkia& disabled_icon,
int accessible_name_id) int accessible_name_id)
: views::ImageButton(listener), ink_drop_style_(ink_drop_style) { : views::ImageButton(listener) {
DCHECK_EQ(normal_icon.width(), disabled_icon.width()); DCHECK_EQ(normal_icon.width(), disabled_icon.width());
DCHECK_EQ(normal_icon.height(), disabled_icon.height()); DCHECK_EQ(normal_icon.height(), disabled_icon.height());
...@@ -40,11 +40,9 @@ SystemMenuButton::SystemMenuButton(views::ButtonListener* listener, ...@@ -40,11 +40,9 @@ SystemMenuButton::SystemMenuButton(views::ButtonListener* listener,
} }
SystemMenuButton::SystemMenuButton(views::ButtonListener* listener, SystemMenuButton::SystemMenuButton(views::ButtonListener* listener,
TrayPopupInkDropStyle ink_drop_style,
const gfx::VectorIcon& icon, const gfx::VectorIcon& icon,
int accessible_name_id) int accessible_name_id)
: SystemMenuButton(listener, : SystemMenuButton(listener,
ink_drop_style,
gfx::ImageSkia(), gfx::ImageSkia(),
gfx::ImageSkia(), gfx::ImageSkia(),
accessible_name_id) { accessible_name_id) {
...@@ -65,30 +63,28 @@ void SystemMenuButton::SetInkDropColor(SkColor color) { ...@@ -65,30 +63,28 @@ void SystemMenuButton::SetInkDropColor(SkColor color) {
} }
std::unique_ptr<views::InkDrop> SystemMenuButton::CreateInkDrop() { std::unique_ptr<views::InkDrop> SystemMenuButton::CreateInkDrop() {
return TrayPopupUtils::CreateInkDrop(ink_drop_style_, this); return TrayPopupUtils::CreateInkDrop(this);
} }
std::unique_ptr<views::InkDropRipple> SystemMenuButton::CreateInkDropRipple() std::unique_ptr<views::InkDropRipple> SystemMenuButton::CreateInkDropRipple()
const { const {
return ink_drop_color_ == base::nullopt return TrayPopupUtils::CreateInkDropRipple(
? TrayPopupUtils::CreateInkDropRipple( TrayPopupInkDropStyle::HOST_CENTERED, this,
ink_drop_style_, this, GetInkDropCenterBasedOnLastEvent()) GetInkDropCenterBasedOnLastEvent(),
: TrayPopupUtils::CreateInkDropRipple( ink_drop_color_.value_or(kTrayPopupInkDropBaseColor));
ink_drop_style_, this, GetInkDropCenterBasedOnLastEvent(),
ink_drop_color_.value());
} }
std::unique_ptr<views::InkDropHighlight> std::unique_ptr<views::InkDropHighlight>
SystemMenuButton::CreateInkDropHighlight() const { SystemMenuButton::CreateInkDropHighlight() const {
return ink_drop_color_ == base::nullopt return TrayPopupUtils::CreateInkDropHighlight(
? TrayPopupUtils::CreateInkDropHighlight(ink_drop_style_, this) TrayPopupInkDropStyle::HOST_CENTERED, this,
: TrayPopupUtils::CreateInkDropHighlight(ink_drop_style_, this, ink_drop_color_.value_or(kTrayPopupInkDropBaseColor));
ink_drop_color_.value());
} }
std::unique_ptr<views::InkDropMask> SystemMenuButton::CreateInkDropMask() std::unique_ptr<views::InkDropMask> SystemMenuButton::CreateInkDropMask()
const { const {
return TrayPopupUtils::CreateInkDropMask(ink_drop_style_, this); return TrayPopupUtils::CreateInkDropMask(TrayPopupInkDropStyle::HOST_CENTERED,
this);
} }
} // namespace ash } // namespace ash
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#define ASH_SYSTEM_TRAY_SYSTEM_MENU_BUTTON_H_ #define ASH_SYSTEM_TRAY_SYSTEM_MENU_BUTTON_H_
#include "ash/resources/vector_icons/vector_icons.h" #include "ash/resources/vector_icons/vector_icons.h"
#include "ash/system/tray/tray_popup_ink_drop_style.h"
#include "base/macros.h" #include "base/macros.h"
#include "base/optional.h" #include "base/optional.h"
#include "ui/gfx/image/image_skia.h" #include "ui/gfx/image/image_skia.h"
...@@ -21,11 +20,9 @@ class SystemMenuButton : public views::ImageButton { ...@@ -21,11 +20,9 @@ class SystemMenuButton : public views::ImageButton {
public: public:
// Constructs the button with |listener| and a centered icon corresponding to // Constructs the button with |listener| and a centered icon corresponding to
// |normal_icon| when button is enabled and |disabled_icon| when it is // |normal_icon| when button is enabled and |disabled_icon| when it is
// disabled. |ink_drop_style| specifies which flavor of the ink drop should be // disabled. |accessible_name_id| corresponds to the string in
// used. |accessible_name_id| corresponds to the string in ui::ResourceBundle // ui::ResourceBundle to use for the button's accessible and tooltip text.
// to use for the button's accessible and tooltip text.
SystemMenuButton(views::ButtonListener* listener, SystemMenuButton(views::ButtonListener* listener,
TrayPopupInkDropStyle ink_drop_style,
const gfx::ImageSkia& normal_icon, const gfx::ImageSkia& normal_icon,
const gfx::ImageSkia& disabled_icon, const gfx::ImageSkia& disabled_icon,
int accessible_name_id); int accessible_name_id);
...@@ -34,7 +31,6 @@ class SystemMenuButton : public views::ImageButton { ...@@ -34,7 +31,6 @@ class SystemMenuButton : public views::ImageButton {
// creates the normal and disabled icons based on that using default menu icon // creates the normal and disabled icons based on that using default menu icon
// colors. // colors.
SystemMenuButton(views::ButtonListener* listener, SystemMenuButton(views::ButtonListener* listener,
TrayPopupInkDropStyle ink_drop_style,
const gfx::VectorIcon& icon, const gfx::VectorIcon& icon,
int accessible_name_id); int accessible_name_id);
~SystemMenuButton() override; ~SystemMenuButton() override;
...@@ -59,9 +55,6 @@ class SystemMenuButton : public views::ImageButton { ...@@ -59,9 +55,6 @@ class SystemMenuButton : public views::ImageButton {
// Returns the size that the ink drop should be constructed with. // Returns the size that the ink drop should be constructed with.
gfx::Size GetInkDropSize() const; gfx::Size GetInkDropSize() const;
// Defines the flavor of ink drop ripple/highlight that should be constructed.
TrayPopupInkDropStyle ink_drop_style_;
// The color to use when creating the ink drop. If null the default color is // The color to use when creating the ink drop. If null the default color is
// used as defined by TrayPopupUtils::CreateInkDropRipple() and // used as defined by TrayPopupUtils::CreateInkDropRipple() and
// TrayPopupUtils::CreateInkDropHighlight(). // TrayPopupUtils::CreateInkDropHighlight().
......
...@@ -410,9 +410,8 @@ void TrayDetailsView::ShowProgress(double value, bool visible) { ...@@ -410,9 +410,8 @@ void TrayDetailsView::ShowProgress(double value, bool visible) {
views::Button* TrayDetailsView::CreateSettingsButton( views::Button* TrayDetailsView::CreateSettingsButton(
int setting_accessible_name_id) { int setting_accessible_name_id) {
SystemMenuButton* button = SystemMenuButton* button = new SystemMenuButton(this, kSystemMenuSettingsIcon,
new SystemMenuButton(this, TrayPopupInkDropStyle::HOST_CENTERED, setting_accessible_name_id);
kSystemMenuSettingsIcon, setting_accessible_name_id);
if (!TrayPopupUtils::CanOpenWebUISettings()) if (!TrayPopupUtils::CanOpenWebUISettings())
button->SetEnabled(false); button->SetEnabled(false);
return button; return button;
...@@ -420,8 +419,7 @@ views::Button* TrayDetailsView::CreateSettingsButton( ...@@ -420,8 +419,7 @@ views::Button* TrayDetailsView::CreateSettingsButton(
views::Button* TrayDetailsView::CreateHelpButton() { views::Button* TrayDetailsView::CreateHelpButton() {
SystemMenuButton* button = SystemMenuButton* button =
new SystemMenuButton(this, TrayPopupInkDropStyle::HOST_CENTERED, new SystemMenuButton(this, kSystemMenuHelpIcon, IDS_ASH_STATUS_TRAY_HELP);
kSystemMenuHelpIcon, IDS_ASH_STATUS_TRAY_HELP);
// Help opens a web page, so treat it like Web UI settings. // Help opens a web page, so treat it like Web UI settings.
if (!TrayPopupUtils::CanOpenWebUISettings()) if (!TrayPopupUtils::CanOpenWebUISettings())
button->SetEnabled(false); button->SetEnabled(false);
...@@ -460,8 +458,7 @@ void TrayDetailsView::DoTransitionToDefaultView() { ...@@ -460,8 +458,7 @@ void TrayDetailsView::DoTransitionToDefaultView() {
views::Button* TrayDetailsView::CreateBackButton() { views::Button* TrayDetailsView::CreateBackButton() {
SystemMenuButton* button = new SystemMenuButton( SystemMenuButton* button = new SystemMenuButton(
this, TrayPopupInkDropStyle::HOST_CENTERED, kSystemMenuArrowBackIcon, this, kSystemMenuArrowBackIcon, IDS_ASH_STATUS_TRAY_PREVIOUS_MENU);
IDS_ASH_STATUS_TRAY_PREVIOUS_MENU);
return button; return button;
} }
......
...@@ -134,8 +134,7 @@ class BorderlessLabelButton : public views::LabelButton { ...@@ -134,8 +134,7 @@ class BorderlessLabelButton : public views::LabelButton {
// TODO(estade,bruthig): there's a lot in common here with ActionableView. // TODO(estade,bruthig): there's a lot in common here with ActionableView.
// Find a way to share. See related TODO on InkDropHostView::SetInkDropMode(). // Find a way to share. See related TODO on InkDropHostView::SetInkDropMode().
std::unique_ptr<views::InkDrop> CreateInkDrop() override { std::unique_ptr<views::InkDrop> CreateInkDrop() override {
return TrayPopupUtils::CreateInkDrop(TrayPopupInkDropStyle::INSET_BOUNDS, return TrayPopupUtils::CreateInkDrop(this);
this);
} }
std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override { std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override {
...@@ -321,7 +320,6 @@ views::Separator* TrayPopupUtils::CreateVerticalSeparator() { ...@@ -321,7 +320,6 @@ views::Separator* TrayPopupUtils::CreateVerticalSeparator() {
} }
std::unique_ptr<views::InkDrop> TrayPopupUtils::CreateInkDrop( std::unique_ptr<views::InkDrop> TrayPopupUtils::CreateInkDrop(
TrayPopupInkDropStyle ink_drop_style,
views::InkDropHostView* host) { views::InkDropHostView* host) {
std::unique_ptr<views::InkDropImpl> ink_drop = std::unique_ptr<views::InkDropImpl> ink_drop =
std::make_unique<views::InkDropImpl>(host, host->size()); std::make_unique<views::InkDropImpl>(host, host->size());
......
...@@ -154,13 +154,12 @@ class TrayPopupUtils { ...@@ -154,13 +154,12 @@ class TrayPopupUtils {
// returned separator. // returned separator.
static views::Separator* CreateVerticalSeparator(); static views::Separator* CreateVerticalSeparator();
// Creates in InkDrop instance for |host| according to the |ink_drop_style|. // Creates in InkDrop instance for |host|.
// All styles are configured to show the highlight when the ripple is visible. // All styles are configured to show the highlight when the ripple is visible.
// //
// All targetable views in the system menu should delegate // All targetable views in the system menu should delegate
// InkDropHost::CreateInkDrop() calls here. // InkDropHost::CreateInkDrop() calls here.
static std::unique_ptr<views::InkDrop> CreateInkDrop( static std::unique_ptr<views::InkDrop> CreateInkDrop(
TrayPopupInkDropStyle ink_drop_style,
views::InkDropHostView* host); views::InkDropHostView* host);
// Creates an InkDropRipple instance for |host| according to the // Creates an InkDropRipple instance for |host| according to the
......
...@@ -98,8 +98,7 @@ void ButtonFromView::RemoveInkDropLayer(ui::Layer* ink_drop_layer) { ...@@ -98,8 +98,7 @@ void ButtonFromView::RemoveInkDropLayer(ui::Layer* ink_drop_layer) {
} }
std::unique_ptr<views::InkDrop> ButtonFromView::CreateInkDrop() { std::unique_ptr<views::InkDrop> ButtonFromView::CreateInkDrop() {
return TrayPopupUtils::CreateInkDrop(TrayPopupInkDropStyle::INSET_BOUNDS, return TrayPopupUtils::CreateInkDrop(this);
this);
} }
std::unique_ptr<views::InkDropRipple> ButtonFromView::CreateInkDropRipple() std::unique_ptr<views::InkDropRipple> ButtonFromView::CreateInkDropRipple()
......
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