summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorjianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-11 01:05:35 +0000
committerjianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-11 01:05:35 +0000
commit0236be2255e0e332a5a4ae449b411c28f2e2dce8 (patch)
tree690e910eeddabc9f38bfaaa6ae2ff9d2b3259539 /chrome/browser
parent9e80090ab887066a41e470cb2bf4e3fb379f6ed2 (diff)
downloadchromium_src-0236be2255e0e332a5a4ae449b411c28f2e2dce8.zip
chromium_src-0236be2255e0e332a5a4ae449b411c28f2e2dce8.tar.gz
chromium_src-0236be2255e0e332a5a4ae449b411c28f2e2dce8.tar.bz2
Fix bug 108706: Notifications break "open new page when clicking on dock item" behavior in mac
BUG=108706 TEST=Manual test by opening a notification/panel, closing the tabbed window and clicking on dock item Review URL: http://codereview.chromium.org/9114030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117134 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/app_controller_mac.mm16
1 files changed, 12 insertions, 4 deletions
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm
index a693a20..2b77a92 100644
--- a/chrome/browser/app_controller_mac.mm
+++ b/chrome/browser/app_controller_mac.mm
@@ -951,10 +951,18 @@ const AEEventClass kAECloudPrintUninstallClass = 'GCPu';
if (browser_shutdown::IsTryingToQuit())
return NO;
- // Don't do anything if there are visible windows. This will cause
- // AppKit to unminimize the most recently minimized window.
- if (flag)
- return YES;
+ // Don't do anything if there are visible tabbed or popup windows. This will
+ // cause AppKit to unminimize the most recently minimized window. If the
+ // visible windows are panels or notifications, we still need to open a new
+ // window.
+ if (flag) {
+ for (BrowserList::const_iterator iter = BrowserList::begin();
+ iter != BrowserList::end(); ++iter) {
+ Browser* browser = *iter;
+ if (browser->is_type_tabbed() || browser->is_type_popup())
+ return YES;
+ }
+ }
// If launched as a hidden login item (due to installation of a persistent app
// or by the user, for example in System Preferenecs->Accounts->Login Items),