Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3539)

Unified Diff: chrome/browser/views/browser_bubble.h

Issue 119103: Part 1 of dragging extensions on the shelf. This part was just about getting... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/extension_view.cc ('k') | chrome/browser/views/browser_bubble.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « chrome/browser/extensions/extension_view.cc ('k') | chrome/browser/views/browser_bubble.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698