blob: 1e5f3ea5e3afc34e2dcda9465264f8e443995b3f [file] [log] [blame]
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/views/view.h"
namespace gfx {
class Canvas;
} // namespace gfx
namespace ash {
// A View having rounded corners and a specified background color which is
// only painted within the bounds defined by the rounded corners.
// TODO(varkha): This duplicates code from RoundedImageView. Refactor these
// classes and move into ui/views.
// TODO(manucornet): Move this class out of ash/wm/overview as a stop gap to the
// above as it is also used by shelf and splitview.
class RoundedRectView : public views::View {
RoundedRectView(int corner_radius, SkColor background_color);
~RoundedRectView() override;
void SetBackgroundColor(SkColor background_color);
void SetCornerRadius(int radius);
// views::View:
void OnPaint(gfx::Canvas* canvas) override;
int corner_radius_;
SkColor background_color_;
} // namespace ash