#include "components/media_message_center/media_notification_background_ash_impl.h"
#include "base/i18n/rtl.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/skia_conversions.h"
#include "ui/gfx/image/image_skia_operations.h"
#include "ui/views/view.h"
namespace media_message_center {
namespace {
constexpr SkColor kBackgroundColor = …;
constexpr SkColor kForegroundColor = …;
constexpr gfx::Size kArtworkSize(80, 80);
constexpr int kArtworkBottomMargin = …;
constexpr int kArtworkRightMargin = …;
constexpr int kArtworkCornerRadius = …;
gfx::Size ScaleToFitSize(const gfx::Size& image_size) { … }
}
MediaNotificationBackgroundAshImpl::MediaNotificationBackgroundAshImpl(
bool paint_artwork)
: … { … }
gfx::Rect MediaNotificationBackgroundAshImpl::GetArtworkBounds(
const gfx::Rect& view_bounds) const { … }
SkPath MediaNotificationBackgroundAshImpl::GetArtworkClipPath(
const gfx::Rect& view_bounds) const { … }
void MediaNotificationBackgroundAshImpl::Paint(gfx::Canvas* canvas,
views::View* view) const { … }
void MediaNotificationBackgroundAshImpl::UpdateArtwork(
const gfx::ImageSkia& image) { … }
bool MediaNotificationBackgroundAshImpl::UpdateCornerRadius(int top_radius,
int bottom_radius) { … }
bool MediaNotificationBackgroundAshImpl::UpdateArtworkMaxWidthPct(
double max_width_pct) { … }
SkColor MediaNotificationBackgroundAshImpl::GetBackgroundColor(
const views::View& owner) const { … }
SkColor MediaNotificationBackgroundAshImpl::GetForegroundColor(
const views::View& owner) const { … }
}