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

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

Issue 8870003: Merge BorderContentsView into BubbleFrameView; simplify. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove allow_bubble_offscreen, simplify and update tests. 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 8ece4d9b797cbc9c7f31301f8d70f3d193b38fb9..277d8a848f86731ef79f3cfcaaa63bc93114e2f5 100644
--- a/chrome/browser/speech/speech_input_bubble_views.cc
+++ b/chrome/browser/speech/speech_input_bubble_views.cc
@@ -111,11 +111,11 @@ void SpeechInputBubbleView::OnWidgetActivationChanged(views::Widget* widget,
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))
+ gfx::Rect anchor(element_rect_);
+ anchor.Offset(container_rect.origin());
+ if (!container_rect.Intersects(anchor))
return BubbleDelegateView::GetAnchorRect();
- return gfx::Rect(anchor, gfx::Size());
+ return anchor;
}
void SpeechInputBubbleView::Init() {
« no previous file with comments | « no previous file | chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc » ('j') | ui/views/bubble/bubble_frame_view.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698