summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-12 21:55:24 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-12 21:55:24 +0000
commitfe60fbbb329988a1b4eab5fcc78faaad719cda1b (patch)
tree7b27cba68f372faeb3429c0f0fc90549b870b352 /chrome
parent8c30313c62097a718190a9df00e681a75e47d42f (diff)
downloadchromium_src-fe60fbbb329988a1b4eab5fcc78faaad719cda1b.zip
chromium_src-fe60fbbb329988a1b4eab5fcc78faaad719cda1b.tar.gz
chromium_src-fe60fbbb329988a1b4eab5fcc78faaad719cda1b.tar.bz2
Fix infobubble crash due to first run bubble having slightly different initialization path than the bookmarks bubble.
http://crbug.com/4344 Review URL: http://codereview.chromium.org/10849 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5301 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/views/first_run_bubble.cc5
-rw-r--r--chrome/browser/views/info_bubble.cc8
2 files changed, 4 insertions, 9 deletions
diff --git a/chrome/browser/views/first_run_bubble.cc b/chrome/browser/views/first_run_bubble.cc
index a11eb73..511d445 100644
--- a/chrome/browser/views/first_run_bubble.cc
+++ b/chrome/browser/views/first_run_bubble.cc
@@ -207,11 +207,6 @@ FirstRunBubble* FirstRunBubble::Show(HWND parent_hwnd,
views::View* view = new FirstRunBubbleView(window);
window->SetDelegate(window);
window->Init(parent_hwnd, position_relative_to, view);
-
- views::Window* parent_window =
- reinterpret_cast<views::Window*>(win_util::GetWindowUserData(
- parent_hwnd));
- parent_window->DisableInactiveRendering(true);
window->ShowWindow(SW_SHOW);
return window;
}
diff --git a/chrome/browser/views/info_bubble.cc b/chrome/browser/views/info_bubble.cc
index 59ba380..9106b3e 100644
--- a/chrome/browser/views/info_bubble.cc
+++ b/chrome/browser/views/info_bubble.cc
@@ -72,10 +72,6 @@ InfoBubble* InfoBubble::Show(HWND parent_hwnd,
InfoBubbleDelegate* delegate) {
InfoBubble* window = new InfoBubble();
window->Init(parent_hwnd, position_relative_to, content);
- window->parent_ =
- reinterpret_cast<views::Window*>(win_util::GetWindowUserData(
- parent_hwnd));
- window->parent_->DisableInactiveRendering(true);
window->ShowWindow(SW_SHOW);
window->delegate_ = delegate;
return window;
@@ -90,6 +86,10 @@ InfoBubble::~InfoBubble() {
void InfoBubble::Init(HWND parent_hwnd,
const gfx::Rect& position_relative_to,
views::View* content) {
+ parent_ = reinterpret_cast<views::Window*>(win_util::GetWindowUserData(
+ parent_hwnd));
+ parent_->DisableInactiveRendering(true);
+
if (kInfoBubbleCornerTopLeft == NULL) {
kInfoBubbleCornerTopLeft = ResourceBundle::GetSharedInstance()
.GetBitmapNamed(IDR_INFO_BUBBLE_CORNER_TOP_LEFT);