| Index: ui/views/bubble/bubble_frame_view.h
|
| diff --git a/ui/views/bubble/bubble_frame_view.h b/ui/views/bubble/bubble_frame_view.h
|
| index 03b6db7b0c59dd7e123b36464230a41ca9f37345..45451a4e0fa7c4494a518fee2caa301f80d35eae 100644
|
| --- a/ui/views/bubble/bubble_frame_view.h
|
| +++ b/ui/views/bubble/bubble_frame_view.h
|
| @@ -9,16 +9,19 @@
|
| #include "base/compiler_specific.h"
|
| #include "base/gtest_prod_util.h"
|
| #include "ui/gfx/insets.h"
|
| +#include "ui/views/controls/button/button.h"
|
| #include "ui/views/window/non_client_view.h"
|
|
|
| namespace views {
|
|
|
| +class Label;
|
| +class LabelButton;
|
| class BubbleBorder;
|
|
|
| // The non-client frame view of bubble-styled widgets.
|
| -class VIEWS_EXPORT BubbleFrameView : public NonClientFrameView {
|
| +class VIEWS_EXPORT BubbleFrameView : public NonClientFrameView,
|
| + public ButtonListener {
|
| public:
|
| -
|
| explicit BubbleFrameView(const gfx::Insets& content_margins);
|
| virtual ~BubbleFrameView();
|
|
|
| @@ -28,13 +31,19 @@ class VIEWS_EXPORT BubbleFrameView : public NonClientFrameView {
|
| 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 void UpdateWindowTitle() OVERRIDE {}
|
| + gfx::Path* window_mask) OVERRIDE;
|
| + virtual void ResetWindowControls() OVERRIDE;
|
| + virtual void UpdateWindowIcon() OVERRIDE;
|
| + virtual void UpdateWindowTitle() OVERRIDE;
|
|
|
| // View overrides:
|
| + virtual gfx::Insets GetInsets() const OVERRIDE;
|
| virtual gfx::Size GetPreferredSize() OVERRIDE;
|
| + virtual void Layout() OVERRIDE;
|
| + virtual std::string GetClassName() const OVERRIDE;
|
| +
|
| + // Overridden from ButtonListener:
|
| + virtual void ButtonPressed(Button* sender, const ui::Event& event) OVERRIDE;
|
|
|
| // Use bubble_border() and SetBubbleBorder(), not border() and set_border().
|
| BubbleBorder* bubble_border() const { return bubble_border_; }
|
| @@ -42,6 +51,11 @@ class VIEWS_EXPORT BubbleFrameView : public NonClientFrameView {
|
|
|
| gfx::Insets content_margins() const { return content_margins_; }
|
|
|
| + void SetTitle(const string16& title);
|
| + void SetShowCloseButton(bool show);
|
| +
|
| + void set_can_drag(bool can_drag) { can_drag_ = can_drag; }
|
| +
|
| // Given the size of the contents and the rect to point at, returns the bounds
|
| // of the bubble window. The bubble's arrow location may change if the bubble
|
| // does not fit on the monitor and |adjust_if_offscreen| is true.
|
| @@ -74,6 +88,13 @@ class VIEWS_EXPORT BubbleFrameView : public NonClientFrameView {
|
| // Margins between the content and the inside of the border, in pixels.
|
| gfx::Insets content_margins_;
|
|
|
| + // The optional title and (x) close button.
|
| + Label* title_;
|
| + LabelButton* close_;
|
| +
|
| + // A flag controlling the ability to drag this frame.
|
| + bool can_drag_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(BubbleFrameView);
|
| };
|
|
|
|
|