Index: chrome/browser/views/browser_bubble.h |
=================================================================== |
--- chrome/browser/views/browser_bubble.h (revision 17478) |
+++ chrome/browser/views/browser_bubble.h (working copy) |
@@ -30,6 +30,15 @@ |
const gfx::Point& origin); |
virtual ~BrowserBubble(); |
+ // Call manually if you need to detach the bubble from tracking the browser's |
+ // position. Note that you must call this manually before deleting this |
+ // object since it can't be safely called from the destructor. |
+ void DetachFromBrowser(); |
+ |
+ // Normally called automatically during construction, but if DetachFromBrowser |
+ // has been called manually, then this call will reattach. |
+ void AttachToBrowser(); |
+ |
// Get/Set the delegate. |
Delegate* delegate() const { return delegate_; } |
void set_delegate(Delegate* del) { delegate_ = del; } |
@@ -49,6 +58,7 @@ |
// Set the bounds of the bubble relative to the browser window. |
void SetBounds(int x, int y, int w, int h); |
+ void MoveTo(int x, int y); |
int width() { return bounds_.width(); } |
int height() { return bounds_.height(); } |
@@ -56,24 +66,25 @@ |
// we have to manually position it when the browser window moves. |
void Reposition(); |
+ // Resize the bubble to fit the view. |
+ void ResizeToView(); |
+ |
protected: |
// Create the popup widget. |
virtual void InitPopup(); |
- // Destroy the popup widget. |
- virtual void DestroyPopup(); |
- |
// Move the popup to an absolute position. |
void MovePopup(int x, int y, int w, int h); |
private: |
// The frame that this bubble is attached to. |
views::Widget* frame_; |
+ gfx::NativeView frame_native_view_; |
// The view that is displayed in this bubble. |
views::View* view_; |
- // The actual widget that this bubble is in. |
+ // The widget that this bubble is in. |
scoped_ptr<views::Widget> popup_; |
// The bounds relative to the frame. |
@@ -85,6 +96,9 @@ |
// The delegate isn't owned by the bubble. |
Delegate* delegate_; |
+ // Is the bubble attached to a Browser window. |
+ bool attached_; |
+ |
DISALLOW_COPY_AND_ASSIGN(BrowserBubble); |
}; |