summaryrefslogtreecommitdiffstats
path: root/chrome/browser/speech
diff options
context:
space:
mode:
authormsw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-15 05:08:25 +0000
committermsw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-15 05:08:25 +0000
commite397c5461b0a14a079072e98765aa38ad036c5b6 (patch)
tree98187a13ed006a0d7dc14135e01cc60e95766284 /chrome/browser/speech
parentf70f44358a3a81707dd5fc589bc86f86012cb19e (diff)
downloadchromium_src-e397c5461b0a14a079072e98765aa38ad036c5b6.zip
chromium_src-e397c5461b0a14a079072e98765aa38ad036c5b6.tar.gz
chromium_src-e397c5461b0a14a079072e98765aa38ad036c5b6.tar.bz2
Merge BorderContentsView into BubbleFrameView; simplify.
Merge these redundant classes and their unit tests. Do not try_mirroring_arrow with dummy anchor rects. Deprecate unused allow_bubble_offscreen bubble flag. Replace GetArrowLocation virtual with simple setter/getter pair. Return anchor view bounds in BubbleDelegateView::GetAnchorRect. Other refactoring and simplification. BUG=106050 TEST=Bubbles are anchored correctly with their arrows in the right location. Review URL: http://codereview.chromium.org/8870003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114598 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/speech')
-rw-r--r--chrome/browser/speech/speech_input_bubble_views.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/chrome/browser/speech/speech_input_bubble_views.cc b/chrome/browser/speech/speech_input_bubble_views.cc
index 2fe29e8..5e56c73 100644
--- a/chrome/browser/speech/speech_input_bubble_views.cc
+++ b/chrome/browser/speech/speech_input_bubble_views.cc
@@ -112,11 +112,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() {