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

Unified Diff: ash/launcher/overflow_bubble.cc

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: ash/launcher/overflow_bubble.cc
diff --git a/ash/launcher/overflow_bubble.cc b/ash/launcher/overflow_bubble.cc
index 1161e166b498b6d050cf312a8e7b35f9fdfd4aa4..4d83c0777620a4d98b0cb6f379f82ca53cb75202 100644
--- a/ash/launcher/overflow_bubble.cc
+++ b/ash/launcher/overflow_bubble.cc
@@ -84,7 +84,7 @@ class OverflowBubbleView : public views::BubbleDelegateView {
ShelfAlignment shelf_alignment_;
LauncherView* launcher_view_; // Owned by views hierarchy.
- gfx::Point scroll_offset_;
+ gfx::Vector2d scroll_offset_;
DISALLOW_COPY_AND_ASSIGN(OverflowBubbleView);
};
@@ -166,7 +166,7 @@ gfx::Size OverflowBubbleView::GetPreferredSize() {
}
void OverflowBubbleView::Layout() {
- const gfx::Point origin(-scroll_offset_.x(), -scroll_offset_.y());
+ const gfx::Point origin(gfx::PointAtOffsetFromOrigin(-scroll_offset_));
Peter Kasting 2012/10/27 01:01:39 Nit: Inline into next statement
danakj 2012/10/29 19:17:20 Done.
launcher_view_->SetBoundsRect(gfx::Rect(origin, GetContentsSize()));
}

Powered by Google App Engine
This is Rietveld 408576698