#ifndef ASH_SHELF_SHELF_BUBBLE_H_
#define ASH_SHELF_SHELF_BUBBLE_H_
#include "ash/ash_export.h"
#include "ash/public/cpp/shelf_types.h"
#include "ash/shelf/shelf_background_animator.h"
#include "ash/shelf/shelf_background_animator_observer.h"
#include "ash/shell.h"
#include "ui/base/metadata/metadata_header_macros.h"
#include "ui/views/bubble/bubble_dialog_delegate_view.h"
namespace views {
class View;
}
namespace ash {
class ASH_EXPORT ShelfBubble : public views::BubbleDialogDelegateView {
METADATA_HEADER(ShelfBubble, views::BubbleDialogDelegateView)
public:
ShelfBubble(views::View* anchor,
ShelfAlignment alignment,
bool for_tooltip,
std::optional<views::BubbleBorder::Arrow> arrow_position);
ShelfBubble(const ShelfBubble&) = delete;
ShelfBubble& operator=(const ShelfBubble&) = delete;
~ShelfBubble() override;
virtual bool ShouldCloseOnPressDown() = 0;
virtual bool ShouldCloseOnMouseExit() = 0;
protected:
void set_border_radius(int radius) { border_radius_ = radius; }
void CreateBubble();
private:
std::unique_ptr<views::FrameView> CreateFrameView(
views::Widget* widget) override;
int border_radius_ = 0;
const bool for_tooltip_;
};
}
#endif