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

Unified Diff: ui/gfx/point.h

Issue 8273040: Minimum size for aura window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed comment, add tests Created 9 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: ui/gfx/point.h
diff --git a/ui/gfx/point.h b/ui/gfx/point.h
index 5f2a3d42287b8b1fd30fa7aa4f2f4fc7a0e5a564..fe39e3b4844c4146fb9d43a01db9ee679f9de7dc 100644
--- a/ui/gfx/point.h
+++ b/ui/gfx/point.h
@@ -66,6 +66,10 @@ class UI_EXPORT Point {
return copy;
}
+ Point Middle(const Point& other) const {
+ return Point((x_ + other.x_) / 2, (y_ + other.y_) / 2);
+ }
+
bool operator==(const Point& rhs) const {
return x_ == rhs.x_ && y_ == rhs.y_;
}

Powered by Google App Engine
This is Rietveld 408576698