#ifndef UI_VIEWS_BUBBLE_BUBBLE_FRAME_VIEW_H_
#define UI_VIEWS_BUBBLE_BUBBLE_FRAME_VIEW_H_
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/gtest_prod_util.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/gfx/insets.h"
#include "ui/views/bubble/bubble_border.h"
#include "ui/views/window/non_client_view.h"
namespace views {
class VIEWS_EXPORT BubbleFrameView : public NonClientFrameView {
public:
BubbleFrameView(const gfx::Insets& margins, BubbleBorder* border);
virtual ~BubbleFrameView();
virtual gfx::Rect GetBoundsForClientView() const OVERRIDE;
virtual gfx::Rect GetWindowBoundsForClientBounds(
const gfx::Rect& client_bounds) const OVERRIDE;
virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE;
virtual void GetWindowMask(const gfx::Size& size,
gfx::Path* window_mask) OVERRIDE {}
virtual void ResetWindowControls() OVERRIDE {}
virtual void UpdateWindowIcon() OVERRIDE {}
virtual gfx::Size GetPreferredSize() OVERRIDE;
BubbleBorder* bubble_border() const { return bubble_border_; }
gfx::Insets content_margins() const { return content_margins_; }
gfx::Rect GetUpdatedWindowBounds(const gfx::Rect& anchor_rect,
gfx::Size client_size,
bool adjust_if_offscreen);
void SetBubbleBorder(BubbleBorder* border);
protected:
virtual gfx::Rect GetMonitorBounds(const gfx::Rect& rect);
private:
FRIEND_TEST_ALL_PREFIXES(BubbleFrameViewTest, GetBoundsForClientView);
void MirrorArrowIfOffScreen(bool vertical,
const gfx::Rect& anchor_rect,
const gfx::Size& client_size);
void OffsetArrowIfOffScreen(const gfx::Rect& anchor_rect,
const gfx::Size& client_size);
BubbleBorder* bubble_border_;
gfx::Insets content_margins_;
DISALLOW_COPY_AND_ASSIGN(BubbleFrameView);
};
}
#endif