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

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

Issue 11269022: Add Vector2d classes that represent offsets, instead of using Point. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 2 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
diff --git a/chrome/browser/notifications/balloon.h b/chrome/browser/notifications/balloon.h
index e03f8d2b2a80495c0ee6e7d950a3e275ba26be52..3c892e56ded6b6cc4653ef3e0fa197e3fcb602c3 100644
--- a/chrome/browser/notifications/balloon.h
+++ b/chrome/browser/notifications/balloon.h
@@ -63,9 +63,9 @@ class Balloon {
}
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::Vector2d& offset() { return offset_;}
Peter Kasting 2012/10/27 01:01:39 Nit: method is const
danakj 2012/10/29 19:17:20 Done.
+ void set_offset(const gfx::Vector2d& offset) { offset_ = offset; }
+ void add_offset(const gfx::Vector2d& offset) { offset_.Add(offset); }
const gfx::Size& content_size() const { return content_size_; }
void set_content_size(const gfx::Size& size) { content_size_ = size; }
@@ -126,7 +126,7 @@ class Balloon {
// 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_;
+ gfx::Vector2d offset_;
// Smallest size for this balloon where scrollbars will be shown.
gfx::Size min_scrollbar_size_;

Powered by Google App Engine
This is Rietveld 408576698