diff options
author | asanka@chromium.org <asanka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-01 17:29:17 +0000 |
---|---|---|
committer | asanka@chromium.org <asanka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-01 17:29:17 +0000 |
commit | 6fab1034a3107da93cd23e64ab133ef9b5936d01 (patch) | |
tree | f9bbed251fc487a4054af6b7f0ed8f106e7d1d48 /chrome/browser/ui/chrome_pages.cc | |
parent | 8f96cef7e737970b9e16c97de788daaa5fb3181a (diff) | |
download | chromium_src-6fab1034a3107da93cd23e64ab133ef9b5936d01.zip chromium_src-6fab1034a3107da93cd23e64ab133ef9b5936d01.tar.gz chromium_src-6fab1034a3107da93cd23e64ab133ef9b5936d01.tar.bz2 |
[Mac] DownloadShelf should be notified when autoclosing.
If the download shelf is already hidden, then the autoclosing
logic on Mac wouldn't notify the DownloadShelf. If the shelf was
hidden temporarily due to the browser entering fullscreen mode,
then the shelf would be restored on exiting fullscreen mode.
Also fix UMA logging of download shelf closures on Mac and
assorted cleanup.
XIB changes:
* Connect close button to |-handleClose:| instead of |-hide:|.
BUG=222360
TEST=(1) Download something that is marked for opening
automatically (e.g. a browser extension).
(2) Enter fullscreen mode before download completes.
(3) Wait for download to complete.
(4) Exit fullscreen mode. The download shelf should be hidden.
Review URL: https://chromiumcodereview.appspot.com/12995025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@191618 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/chrome_pages.cc')
-rw-r--r-- | chrome/browser/ui/chrome_pages.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/chrome/browser/ui/chrome_pages.cc b/chrome/browser/ui/chrome_pages.cc index e9891d1..fe9300c 100644 --- a/chrome/browser/ui/chrome_pages.cc +++ b/chrome/browser/ui/chrome_pages.cc @@ -80,8 +80,9 @@ void ShowDownloads(Browser* browser) { content::RecordAction(UserMetricsAction("ShowDownloads")); if (browser->window()) { DownloadShelf* shelf = browser->window()->GetDownloadShelf(); + // The downloads page is always shown in response to a user action. if (shelf->IsShowing()) - shelf->Close(); + shelf->Close(DownloadShelf::USER_ACTION); } ShowSingletonTabOverwritingNTP( browser, |