summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-13 15:46:04 +0000
committerrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-13 15:46:04 +0000
commit0d75bad6ecfdb9c7611f1001c5a1e9a0347b2337 (patch)
treebcefb2b008d5a53a0ecbf14f531a889fccc39608
parent0e7cb2e57a7240453decbb1710abc8fb6f644a0d (diff)
downloadchromium_src-0d75bad6ecfdb9c7611f1001c5a1e9a0347b2337.zip
chromium_src-0d75bad6ecfdb9c7611f1001c5a1e9a0347b2337.tar.gz
chromium_src-0d75bad6ecfdb9c7611f1001c5a1e9a0347b2337.tar.bz2
In ExtensionHostMac::~ExtensionHostMac, only close visible popups.
BUG=56340 TEST=Click on a browser action to open it. Click on the button again to close it. Click on it a third time to open, and it should open as expected. Review URL: http://codereview.chromium.org/6195004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71324 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/extensions/extension_host_mac.mm5
1 files changed, 3 insertions, 2 deletions
diff --git a/chrome/browser/extensions/extension_host_mac.mm b/chrome/browser/extensions/extension_host_mac.mm
index 67bc851..73e29fb 100644
--- a/chrome/browser/extensions/extension_host_mac.mm
+++ b/chrome/browser/extensions/extension_host_mac.mm
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -13,7 +13,8 @@
ExtensionHostMac::~ExtensionHostMac() {
// If there is a popup open for this host's extension, close it.
ExtensionPopupController* popup = [ExtensionPopupController popup];
- if (popup && [popup extensionHost]->extension() == this->extension()) {
+ if ([[popup window] isVisible] &&
+ [popup extensionHost]->extension() == this->extension()) {
InfoBubbleWindow* window = (InfoBubbleWindow*)[popup window];
[window setDelayOnClose:NO];
[popup close];