diff options
Diffstat (limited to 'chrome/browser/notifications/balloon.h')
-rw-r--r-- | chrome/browser/notifications/balloon.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/chrome/browser/notifications/balloon.h b/chrome/browser/notifications/balloon.h index 87440c9..7f3b604 100644 --- a/chrome/browser/notifications/balloon.h +++ b/chrome/browser/notifications/balloon.h @@ -57,9 +57,15 @@ class Balloon { const Notification& notification() const { return *notification_.get(); } Profile* profile() const { return profile_; } - const gfx::Point& position() const { return position_; } + gfx::Point GetPosition() const { + return position_.Add(offset_); + } void SetPosition(const gfx::Point& upper_left, bool reposition); + const gfx::Point& offset() { return offset_;} + void set_offset(const gfx::Point& offset) { offset_ = offset; } + void add_offset(const gfx::Point& offset) { offset_ = offset_.Add(offset); } + const gfx::Size& content_size() const { return content_size_; } void set_content_size(const gfx::Size& size) { content_size_ = size; } @@ -115,6 +121,10 @@ class Balloon { gfx::Point position_; gfx::Size content_size_; + // Temporary offset for balloons that need to be positioned in a non-standard + // position for keeping the close buttons under the mouse cursor. + gfx::Point offset_; + // Smallest size for this balloon where scrollbars will be shown. gfx::Size min_scrollbar_size_; |