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

Unified Diff: chrome/browser/notifications/balloon.h

Issue 2915003: position the balloons after closing in a way that will keep the next one's cl... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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
Index: chrome/browser/notifications/balloon.h
===================================================================
--- chrome/browser/notifications/balloon.h (revision 52083)
+++ chrome/browser/notifications/balloon.h (working copy)
@@ -57,9 +57,15 @@
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 @@
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_;
« no previous file with comments | « chrome/browser/gtk/notifications/balloon_view_gtk.cc ('k') | chrome/browser/notifications/balloon_collection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698