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

Unified Diff: ui/views/bubble/bubble_border.cc

Issue 10808066: Fix position of web notification bubble and arrow (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase Created 8 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
« no previous file with comments | « ui/views/bubble/bubble_border.h ('k') | ui/views/bubble/bubble_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/bubble/bubble_border.cc
diff --git a/ui/views/bubble/bubble_border.cc b/ui/views/bubble/bubble_border.cc
index c24f367b2debe1d2d0b65312476e8d1f17167f5d..a82382c8eb47c50e86d12f6aba20835dbc9a03ba 100644
--- a/ui/views/bubble/bubble_border.cc
+++ b/ui/views/bubble/bubble_border.cc
@@ -174,11 +174,16 @@ gfx::Rect BubbleBorder::GetBounds(const gfx::Rect& position_relative_to,
}
void BubbleBorder::GetInsets(gfx::Insets* insets) const {
+ return GetInsetsForArrowLocation(insets, arrow_location());
+}
+
+void BubbleBorder::GetInsetsForArrowLocation(gfx::Insets* insets,
+ ArrowLocation arrow_loc) const {
int top = images_->top->height();
int bottom = images_->bottom->height();
int left = images_->left->width();
int right = images_->right->width();
- switch (arrow_location_) {
+ switch (arrow_loc) {
case TOP_LEFT:
case TOP_RIGHT:
top = std::max(top, images_->top_arrow->height());
« no previous file with comments | « ui/views/bubble/bubble_border.h ('k') | ui/views/bubble/bubble_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698