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

Unified Diff: chrome/browser/ui/views/confirm_bubble_views.cc

Issue 12036094: Fix crash on spell check "Ask Google for suggestions" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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/confirm_bubble_views.cc
diff --git a/chrome/browser/ui/views/confirm_bubble_views.cc b/chrome/browser/ui/views/confirm_bubble_views.cc
index 2ebba1e3c961e7dcf4775233e36c1bfba1a19a8d..ec130f1cbf75725a162a6de873fa186d91634e98 100644
--- a/chrome/browser/ui/views/confirm_bubble_views.cc
+++ b/chrome/browser/ui/views/confirm_bubble_views.cc
@@ -26,12 +26,14 @@ const int kMaxMessageWidth = 400;
} // namespace
-ConfirmBubbleViews::ConfirmBubbleViews(const gfx::Point& anchor_point,
+ConfirmBubbleViews::ConfirmBubbleViews(gfx::NativeView parent,
+ const gfx::Point& anchor_point,
ConfirmBubbleModel* model)
: BubbleDelegateView(NULL, views::BubbleBorder::NONE),
- anchor_point_(anchor_point),
model_(model) {
DCHECK(model);
+ set_anchor_point(anchor_point);
+ set_parent_window(parent);
James Cook 2013/01/24 22:57:52 This is the core change that fixes the crash.
}
ConfirmBubbleViews::~ConfirmBubbleViews() {
@@ -51,7 +53,7 @@ void ConfirmBubbleViews::LinkClicked(views::Link* source, int event_flags) {
}
gfx::Rect ConfirmBubbleViews::GetAnchorRect() {
- return gfx::Rect(anchor_point_, gfx::Size());
+ return gfx::Rect(anchor_point(), gfx::Size());
}
void ConfirmBubbleViews::Init() {
@@ -159,7 +161,7 @@ namespace chrome {
void ShowConfirmBubble(gfx::NativeView view,
const gfx::Point& origin,
ConfirmBubbleModel* model) {
- ConfirmBubbleViews* bubble = new ConfirmBubbleViews(origin, model);
+ ConfirmBubbleViews* bubble = new ConfirmBubbleViews(view, origin, model);
views::BubbleDelegateView::CreateBubble(bubble);
bubble->Show();
}

Powered by Google App Engine
This is Rietveld 408576698