| Index: chrome/browser/ui/views/link_disambiguation/link_disambiguation_popup.cc
|
| diff --git a/chrome/browser/ui/views/link_disambiguation/link_disambiguation_popup.cc b/chrome/browser/ui/views/link_disambiguation/link_disambiguation_popup.cc
|
| index bc611ecd78fe20318fc3896a30f31eece4a65688..17d4b10d4483410a572395cedee99af580d85e46 100644
|
| --- a/chrome/browser/ui/views/link_disambiguation/link_disambiguation_popup.cc
|
| +++ b/chrome/browser/ui/views/link_disambiguation/link_disambiguation_popup.cc
|
| @@ -19,7 +19,8 @@
|
| class LinkDisambiguationPopup::ZoomBubbleView
|
| : public views::BubbleDelegateView {
|
| public:
|
| - ZoomBubbleView(const gfx::Rect& target_rect,
|
| + ZoomBubbleView(views::Widget* top_level_widget,
|
| + const gfx::Rect& target_rect,
|
| const gfx::ImageSkia* zoomed_skia_image,
|
| const aura::Window* content,
|
| LinkDisambiguationPopup* popup,
|
| @@ -48,13 +49,16 @@ class LinkDisambiguationPopup::ZoomBubbleView
|
| };
|
|
|
| LinkDisambiguationPopup::ZoomBubbleView::ZoomBubbleView(
|
| + views::Widget* top_level_widget,
|
| const gfx::Rect& target_rect,
|
| const gfx::ImageSkia* zoomed_skia_image,
|
| const aura::Window* content,
|
| LinkDisambiguationPopup* popup,
|
| const base::Callback<void(ui::GestureEvent*)>& gesture_cb,
|
| const base::Callback<void(ui::MouseEvent*)>& mouse_cb)
|
| - : BubbleDelegateView(NULL, views::BubbleBorder::FLOAT),
|
| + : BubbleDelegateView(
|
| + top_level_widget ? top_level_widget->GetContentsView() : nullptr,
|
| + views::BubbleBorder::FLOAT),
|
| scale_(static_cast<float>(zoomed_skia_image->width()) /
|
| static_cast<float>(target_rect.width())),
|
| content_(content),
|
| @@ -149,6 +153,7 @@ LinkDisambiguationPopup::~LinkDisambiguationPopup() {
|
| }
|
|
|
| void LinkDisambiguationPopup::Show(
|
| + views::Widget* top_level_widget,
|
| const SkBitmap& zoomed_bitmap,
|
| const gfx::Rect& target_rect,
|
| const gfx::NativeView content,
|
| @@ -157,6 +162,7 @@ void LinkDisambiguationPopup::Show(
|
| content_ = content;
|
|
|
| view_ = new ZoomBubbleView(
|
| + top_level_widget,
|
| target_rect,
|
| gfx::Image::CreateFrom1xBitmap(zoomed_bitmap).ToImageSkia(),
|
| content_,
|
|
|