Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(420)

Issue 1308983009: [Mac] Remove extraneous Bookmarks menu from menu bar when running apps from launcher. (Closed)

Created:
5 years, 3 months ago by dominickn
Modified:
5 years, 3 months ago
Reviewers:
Robert Sesek, jackhou1
CC:
chromium-reviews, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Mac] Remove extraneous Bookmarks menu from menu bar when running apps from launcher. When Chrome is closed, opening a bookmark app from the app launcher on Mac leads to an additional Bookmarks menu appearing on the left of the Mac menu bar. The issue only manifests itself under these exact circumstances. The problem appears to be caused by a bug in AppKit. Calling setSubmenu on a *hidden* NSMenuItem with a *different* NSMenu to the current submenu leads to the NSMenuItem becoming non-hidden. This precise situation occurs when caching the bookmark menu on Mac, which is done to improve profile switching performance. This CL removes the extra Bookmarks menu by saving the hidden state of the menu prior to caching, setting the menu to be visible, allowing the existing caching to run, and then resetting the hidden state once caching is complete. It is insufficient to skip setting the menu to be visible in this process. BUG=497813 Committed: https://crrev.com/b80838fdc92209c443c43a742284ada39dd2d89e Cr-Commit-Position: refs/heads/master@{#347819}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Addressing nits #

Total comments: 6

Patch Set 3 : Addressing reviewer feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -5 lines) Patch
M chrome/browser/app_controller_mac.mm View 1 2 1 chunk +13 lines, -5 lines 0 comments Download

Messages

Total messages: 13 (4 generated)
dominickn
PTAL, thanks.
5 years, 3 months ago (2015-09-04 04:20:22 UTC) #2
jackhou1
lgtm It's common to prefix the CL title with "Mac:" or "[Mac]". I'd mention in ...
5 years, 3 months ago (2015-09-04 07:39:48 UTC) #3
dominickn
@rsesek: PTAL, thanks! https://codereview.chromium.org/1308983009/diff/1/chrome/browser/app_controller_mac.mm File chrome/browser/app_controller_mac.mm (right): https://codereview.chromium.org/1308983009/diff/1/chrome/browser/app_controller_mac.mm#newcode1605 chrome/browser/app_controller_mac.mm:1605: // Reset the hidden state to ...
5 years, 3 months ago (2015-09-04 07:54:02 UTC) #5
Robert Sesek
https://codereview.chromium.org/1308983009/diff/20001/chrome/browser/app_controller_mac.mm File chrome/browser/app_controller_mac.mm (right): https://codereview.chromium.org/1308983009/diff/20001/chrome/browser/app_controller_mac.mm#newcode1589 chrome/browser/app_controller_mac.mm:1589: // See http://crbug/497813 for more details. nit: https://crbug.com is ...
5 years, 3 months ago (2015-09-04 17:33:06 UTC) #6
dominickn
Thanks! https://codereview.chromium.org/1308983009/diff/20001/chrome/browser/app_controller_mac.mm File chrome/browser/app_controller_mac.mm (right): https://codereview.chromium.org/1308983009/diff/20001/chrome/browser/app_controller_mac.mm#newcode1589 chrome/browser/app_controller_mac.mm:1589: // See http://crbug/497813 for more details. On 2015/09/04 ...
5 years, 3 months ago (2015-09-05 00:34:02 UTC) #7
Robert Sesek
LGTM
5 years, 3 months ago (2015-09-08 13:33:32 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1308983009/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1308983009/40001
5 years, 3 months ago (2015-09-08 22:28:56 UTC) #11
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years, 3 months ago (2015-09-08 23:00:19 UTC) #12
commit-bot: I haz the power
5 years, 3 months ago (2015-09-08 23:01:10 UTC) #13
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/b80838fdc92209c443c43a742284ada39dd2d89e
Cr-Commit-Position: refs/heads/master@{#347819}

Powered by Google App Engine
This is Rietveld 408576698