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

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

Issue 2663393003: [ash-md] Removed 'experimental' path from TrayPopupUtils::CreateInkDropRipple(). (Closed)
Patch Set: Inlined var that was only used once. Created 3 years, 11 months 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/tray_popup_utils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/tray/tray_popup_utils.cc
diff --git a/ash/common/system/tray/tray_popup_utils.cc b/ash/common/system/tray/tray_popup_utils.cc
index 608d5679547b067eda283d05e6a9bc762dcf7777..449b8ec6b02515ee6bb819fd2375a1d178601eb7 100644
--- a/ash/common/system/tray/tray_popup_utils.cc
+++ b/ash/common/system/tray/tray_popup_utils.cc
@@ -4,6 +4,9 @@
#include "ash/common/system/tray/tray_popup_utils.h"
+#include <algorithm>
+#include <utility>
+
#include "ash/common/ash_constants.h"
#include "ash/common/ash_view_ids.h"
#include "ash/common/material_design/material_design_controller.h"
@@ -353,30 +356,9 @@ std::unique_ptr<views::InkDropRipple> TrayPopupUtils::CreateInkDropRipple(
const views::View* host,
const gfx::Point& center_point,
SkColor color) {
- const gfx::Rect bounds =
- TrayPopupUtils::GetInkDropBounds(ink_drop_style, host);
- switch (ink_drop_style) {
- case TrayPopupInkDropStyle::HOST_CENTERED:
- if (MaterialDesignController::GetMode() ==
- MaterialDesignController::MATERIAL_EXPERIMENTAL) {
- return base::MakeUnique<views::SquareInkDropRipple>(
- bounds.size(), bounds.size().width() / 2, bounds.size(),
- bounds.size().width() / 2, center_point, bounds.CenterPoint(),
- color, kTrayPopupInkDropRippleOpacity);
- }
- // Intentional fall through.
- case TrayPopupInkDropStyle::INSET_BOUNDS:
- case TrayPopupInkDropStyle::FILL_BOUNDS: {
- const gfx::Insets insets =
- TrayPopupUtils::GetInkDropInsets(ink_drop_style);
- return base::MakeUnique<views::FloodFillInkDropRipple>(
- host->size(), insets, center_point, color,
- kTrayPopupInkDropRippleOpacity);
- }
- }
- // Required for some compilers.
- NOTREACHED();
- return nullptr;
+ return base::MakeUnique<views::FloodFillInkDropRipple>(
+ host->size(), TrayPopupUtils::GetInkDropInsets(ink_drop_style),
+ center_point, color, kTrayPopupInkDropRippleOpacity);
}
std::unique_ptr<views::InkDropHighlight> TrayPopupUtils::CreateInkDropHighlight(
« no previous file with comments | « ash/common/system/tray/tray_popup_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698