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

Unified Diff: chrome/browser/speech/speech_input_bubble_views.cc

Issue 8863009: Fix alignment of avatar bubbles in the NTP (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use Rect::Ofset() Created 9 years 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/speech/speech_input_bubble_views.cc
diff --git a/chrome/browser/speech/speech_input_bubble_views.cc b/chrome/browser/speech/speech_input_bubble_views.cc
index 55444846eba0fd94ce481e452f1f221acd79650e..770cf756cf98f68dda5887268b17457afcb24712 100644
--- a/chrome/browser/speech/speech_input_bubble_views.cc
+++ b/chrome/browser/speech/speech_input_bubble_views.cc
@@ -57,7 +57,7 @@ class SpeechInputBubbleView
// views::BubbleDelegateView methods.
virtual void OnWidgetActivationChanged(views::Widget* widget,
bool active) OVERRIDE;
- virtual gfx::Point GetAnchorPoint() OVERRIDE;
+ virtual gfx::Rect GetAnchorRect() OVERRIDE;
virtual void Init() OVERRIDE;
// views::ButtonListener methods.
@@ -111,14 +111,14 @@ void SpeechInputBubbleView::OnWidgetActivationChanged(views::Widget* widget,
BubbleDelegateView::OnWidgetActivationChanged(widget, active);
}
-gfx::Point SpeechInputBubbleView::GetAnchorPoint() {
+gfx::Rect SpeechInputBubbleView::GetAnchorRect() {
gfx::Rect container_rect;
tab_contents_->GetContainerBounds(&container_rect);
gfx::Point anchor(container_rect.x() + element_rect_.CenterPoint().x(),
container_rect.y() + element_rect_.bottom());
if (!container_rect.Contains(anchor))
- return BubbleDelegateView::GetAnchorPoint();
- return anchor;
+ return BubbleDelegateView::GetAnchorRect();
+ return gfx::Rect(anchor, gfx::Size());
}
void SpeechInputBubbleView::Init() {

Powered by Google App Engine
This is Rietveld 408576698