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

Unified Diff: ash/common/system/tray/system_menu_button.cc

Issue 2480203002: ui: Cleanup class/struct forward declarations (Closed)
Patch Set: Sync CL to position 430550 Created 4 years, 1 month 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
« no previous file with comments | « ash/common/system/tray/system_menu_button.h ('k') | ash/common/system/tray/system_tray_bubble.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/tray/system_menu_button.cc
diff --git a/ash/common/system/tray/system_menu_button.cc b/ash/common/system/tray/system_menu_button.cc
index 5931b24ecf99bf9a96afd8bb4b431b79d91e120a..4c6579ad7a77c18109e8af866e27aa60d07a5009 100644
--- a/ash/common/system/tray/system_menu_button.cc
+++ b/ash/common/system/tray/system_menu_button.cc
@@ -11,6 +11,7 @@
#include "ui/gfx/paint_vector_icon.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_impl.h"
#include "ui/views/animation/square_ink_drop_ripple.h"
#include "ui/views/border.h"
#include "ui/views/painter.h"
@@ -30,9 +31,8 @@ SystemMenuButton::SystemMenuButton(views::ButtonListener* listener,
const int horizontal_padding = (kMenuButtonSize - image.width()) / 2;
const int vertical_padding = (kMenuButtonSize - image.height()) / 2;
- SetBorder(
- views::Border::CreateEmptyBorder(vertical_padding, horizontal_padding,
- vertical_padding, horizontal_padding));
+ SetBorder(views::CreateEmptyBorder(vertical_padding, horizontal_padding,
+ vertical_padding, horizontal_padding));
SetTooltipText(l10n_util::GetStringUTF16(accessible_name_id));
@@ -50,6 +50,13 @@ SystemMenuButton::SystemMenuButton(views::ButtonListener* listener,
SystemMenuButton::~SystemMenuButton() {}
+std::unique_ptr<views::InkDrop> SystemMenuButton::CreateInkDrop() {
+ std::unique_ptr<views::InkDropImpl> ink_drop =
+ CreateDefaultFloodFillInkDropImpl();
+ ink_drop->SetShowHighlightOnHover(false);
+ return std::move(ink_drop);
+}
+
std::unique_ptr<views::InkDropRipple> SystemMenuButton::CreateInkDropRipple()
const {
const gfx::Size size = GetInkDropSize();
@@ -73,11 +80,6 @@ std::unique_ptr<views::InkDropRipple> SystemMenuButton::CreateInkDropRipple()
std::unique_ptr<views::InkDropHighlight>
SystemMenuButton::CreateInkDropHighlight() const {
- // TODO(bruthig): Show the highlight when the ink drop is active. (See
- // crbug.com/649734)
- if (!ShouldShowInkDropHighlight())
- return nullptr;
-
int highlight_radius = 0;
switch (ink_drop_style_) {
case InkDropStyle::SQUARE:
@@ -96,10 +98,6 @@ SystemMenuButton::CreateInkDropHighlight() const {
return highlight;
}
-bool SystemMenuButton::ShouldShowInkDropHighlight() const {
- return false;
-}
-
gfx::Size SystemMenuButton::GetInkDropSize() const {
gfx::Rect bounds = GetLocalBounds();
bounds.Inset(kTrayPopupInkDropInset, kTrayPopupInkDropInset);
« no previous file with comments | « ash/common/system/tray/system_menu_button.h ('k') | ash/common/system/tray/system_tray_bubble.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698