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

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

Issue 8402031: aura: Initialize Widget to avoid a crash when showing bubbles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/bubble/bubble.cc
diff --git a/chrome/browser/ui/views/bubble/bubble.cc b/chrome/browser/ui/views/bubble/bubble.cc
index 73a2acf7469cc269e4f45196a159560815c24721..2d9b105c1a2ea30d2fdf60f68a4489a2cd1df33c 100644
--- a/chrome/browser/ui/views/bubble/bubble.cc
+++ b/chrome/browser/ui/views/bubble/bubble.cc
@@ -205,6 +205,16 @@ void Bubble::InitBubble(views::Widget* parent,
#if defined(USE_AURA)
// TODO(beng):
NOTIMPLEMENTED();
+ // NOTE: This Widget initialization here is mostly to paper over a crash.
+ // This will soon be not necessary anymore with alicet/msw's work on new
+ // bubbles infrastructure.
+ views::Widget::InitParams params;
+ params.transparent = true;
+ params.parent_widget = parent;
+ params.native_widget = this;
+ GetWidget()->Init(params);
+ if (fade_in)
+ SetOpacity(0);
#elif defined(OS_WIN)
views::Widget* parent_window = parent->GetTopLevelWidget();
if (parent_window)
@@ -307,8 +317,7 @@ void Bubble::InitBubble(views::Widget* parent,
// Show the window.
#if defined(USE_AURA)
- // TODO(beng):
- NOTIMPLEMENTED();
+ GetWidget()->Show();
#elif defined(OS_WIN)
border_->ShowWindow(SW_SHOW);
ShowWindow(SW_SHOW);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698