summaryrefslogtreecommitdiffstats
path: root/chrome/browser/speech/speech_input_bubble_views.cc
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-02 01:13:38 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-02 01:13:38 +0000
commitd8d70b1414befb63913ada0abfc135eafd97a8a1 (patch)
tree3d4a290b8121549acfd8aefbb01170624726ab78 /chrome/browser/speech/speech_input_bubble_views.cc
parentb472d4f576eb17916ab3444218dcb4586f60a247 (diff)
downloadchromium_src-d8d70b1414befb63913ada0abfc135eafd97a8a1.zip
chromium_src-d8d70b1414befb63913ada0abfc135eafd97a8a1.tar.gz
chromium_src-d8d70b1414befb63913ada0abfc135eafd97a8a1.tar.bz2
Remove/replace RootView/Widget getters with new NativeWidget getters.
BUG=72040 TEST=existing unittests. Review URL: http://codereview.chromium.org/6598069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76483 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/speech/speech_input_bubble_views.cc')
-rw-r--r--chrome/browser/speech/speech_input_bubble_views.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/chrome/browser/speech/speech_input_bubble_views.cc b/chrome/browser/speech/speech_input_bubble_views.cc
index 6abe5d5..37f53bc 100644
--- a/chrome/browser/speech/speech_input_bubble_views.cc
+++ b/chrome/browser/speech/speech_input_bubble_views.cc
@@ -281,12 +281,11 @@ void SpeechInputBubbleImpl::Show() {
bubble_content_ = new ContentView(delegate_);
UpdateLayout();
- views::Widget* tab = views::Widget::GetWidgetFromNativeView(
- tab_contents()->view()->GetNativeView());
- views::Widget* parent = tab ? tab->GetRootWidget() : NULL;
-
- if (parent) {
- info_bubble_ = InfoBubble::Show(parent,
+ views::NativeWidget* toplevel_widget =
+ views::NativeWidget::GetTopLevelNativeWidget(
+ tab_contents()->view()->GetNativeView());
+ if (toplevel_widget) {
+ info_bubble_ = InfoBubble::Show(toplevel_widget->GetWidget(),
GetInfoBubbleTarget(element_rect_),
BubbleBorder::TOP_LEFT, bubble_content_,
this);