summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/info_bubble.cc
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-11 19:33:32 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-11 19:33:32 +0000
commit316848c3ab8b40e54118c5c5700df5e25119dc3b (patch)
tree38f281b972530c326283dd08d60f2da28c583544 /chrome/browser/views/info_bubble.cc
parentd7af8e7d98ab79ad46707b08b6dd7f6ef272cbbe (diff)
downloadchromium_src-316848c3ab8b40e54118c5c5700df5e25119dc3b.zip
chromium_src-316848c3ab8b40e54118c5c5700df5e25119dc3b.tar.gz
chromium_src-316848c3ab8b40e54118c5c5700df5e25119dc3b.tar.bz2
Fix a crash when dismissing an infobubble... could not locate Window*
Review URL: http://codereview.chromium.org/10405 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5196 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/info_bubble.cc')
-rw-r--r--chrome/browser/views/info_bubble.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/chrome/browser/views/info_bubble.cc b/chrome/browser/views/info_bubble.cc
index 00e5457..59ba380 100644
--- a/chrome/browser/views/info_bubble.cc
+++ b/chrome/browser/views/info_bubble.cc
@@ -72,10 +72,10 @@ InfoBubble* InfoBubble::Show(HWND parent_hwnd,
InfoBubbleDelegate* delegate) {
InfoBubble* window = new InfoBubble();
window->Init(parent_hwnd, position_relative_to, content);
- views::Window* parent_window =
+ window->parent_ =
reinterpret_cast<views::Window*>(win_util::GetWindowUserData(
parent_hwnd));
- parent_window->DisableInactiveRendering(true);
+ window->parent_->DisableInactiveRendering(true);
window->ShowWindow(SW_SHOW);
window->delegate_ = delegate;
return window;
@@ -144,10 +144,7 @@ void InfoBubble::Close() {
// We don't fade out because it looks terrible.
if (delegate_)
delegate_->InfoBubbleClosing(this);
- views::Window* parent_window =
- reinterpret_cast<views::Window*>(
- win_util::GetWindowUserData(GetAncestor(GetHWND(), GA_ROOT)));
- parent_window->DisableInactiveRendering(false);
+ parent_->DisableInactiveRendering(false);
ContainerWin::Close();
}