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

Unified Diff: chrome/browser/ui/views/link_disambiguation/link_disambiguation_popup.cc

Issue 680643002: Ensure that the main window does not render as deactivated when the link disambiguation bubble is d… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review comments Created 6 years, 2 months 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/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_,

Powered by Google App Engine
This is Rietveld 408576698