1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
ash / shelf / shelf_tooltip_bubble.h [blame]
// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ASH_SHELF_SHELF_TOOLTIP_BUBBLE_H_
#define ASH_SHELF_SHELF_TOOLTIP_BUBBLE_H_
#include "ash/ash_export.h"
#include "ash/shelf/shelf_bubble.h"
namespace views {
class BubbleDialogDelegateView;
class View;
} // namespace views
namespace ash {
// The implementation of tooltip bubbles for the shelf.
class ASH_EXPORT ShelfTooltipBubble : public ShelfBubble {
public:
ShelfTooltipBubble(views::View* anchor,
ShelfAlignment alignment,
const std::u16string& text,
std::optional<views::BubbleBorder::Arrow> arrow_position);
ShelfTooltipBubble(const ShelfTooltipBubble&) = delete;
ShelfTooltipBubble& operator=(const ShelfTooltipBubble&) = delete;
protected:
// ShelfBubble:
bool ShouldCloseOnPressDown() override;
bool ShouldCloseOnMouseExit() override;
private:
// BubbleDialogDelegateView overrides:
gfx::Size CalculatePreferredSize(
const views::SizeBounds& available_size) const override;
};
} // namespace ash
#endif // ASH_SHELF_SHELF_TOOLTIP_BUBBLE_H_