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

Issue 18089012: Swap main menu with app-specific menu when app window focused. (Closed)

Created:
7 years, 5 months ago by jackhou1
Modified:
7 years, 4 months ago
Reviewers:
tapted, Nico
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, jeremya+watch_chromium.org, extensions-reviews_chromium.org, chrome-apps-syd-reviews_chromium.org
Visibility:
Public.

Description

Swap main menu with app-specific menu when app window focused. When an app window is focused, a new menu item is created for that app and appended to the main menu. All of Chrome's menu items are hidden. When a Chrome window is focused, the app's menu item is removed and Chrome's menu items are unhidden. BUG=168080 TEST=Start an app. Focus the app window, the only item in the main menu bar should be that app. Focus a browser window, the main menu bar returns to normal. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=213031

Patch Set 1 #

Total comments: 16

Patch Set 2 : Sync and rebase #

Patch Set 3 : Address comments. Use NSWindowDidBecomeMainNotification. #

Total comments: 19

Patch Set 4 : Address comments #

Total comments: 10

Patch Set 5 : Sync and rebase #

Patch Set 6 : Address comments. #

Patch Set 7 : Add browsertest. #

Total comments: 7

Patch Set 8 : Address comments #

Total comments: 6

Patch Set 9 : Address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+133 lines, -1 line) Patch
M chrome/browser/app_controller_mac.h View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/app_controller_mac.mm View 1 2 3 4 5 6 7 8 6 chunks +56 lines, -0 lines 0 comments Download
M chrome/browser/app_controller_mac_browsertest.mm View 1 2 3 4 5 6 7 4 chunks +74 lines, -1 line 0 comments Download

Messages

Total messages: 23 (0 generated)
jackhou1
7 years, 5 months ago (2013-06-28 03:16:57 UTC) #1
tapted
https://codereview.chromium.org/18089012/diff/1/chrome/browser/app_controller_mac.h File chrome/browser/app_controller_mac.h (right): https://codereview.chromium.org/18089012/diff/1/chrome/browser/app_controller_mac.h#newcode126 chrome/browser/app_controller_mac.h:126: - (void)setMenuBarToApp:(NSString*)app_id argument should be appId https://codereview.chromium.org/18089012/diff/1/chrome/browser/app_controller_mac.mm File chrome/browser/app_controller_mac.mm ...
7 years, 5 months ago (2013-06-28 04:09:42 UTC) #2
jackhou1
https://codereview.chromium.org/18089012/diff/1/chrome/browser/app_controller_mac.h File chrome/browser/app_controller_mac.h (right): https://codereview.chromium.org/18089012/diff/1/chrome/browser/app_controller_mac.h#newcode126 chrome/browser/app_controller_mac.h:126: - (void)setMenuBarToApp:(NSString*)app_id On 2013/06/28 04:09:43, tapted wrote: > argument ...
7 years, 5 months ago (2013-07-04 01:57:54 UTC) #3
tapted
make sure you update the CL description too ;) https://codereview.chromium.org/18089012/diff/10001/chrome/browser/app_controller_mac.h File chrome/browser/app_controller_mac.h (right): https://codereview.chromium.org/18089012/diff/10001/chrome/browser/app_controller_mac.h#newcode85 chrome/browser/app_controller_mac.h:85: ...
7 years, 5 months ago (2013-07-04 02:43:33 UTC) #4
jackhou1
https://codereview.chromium.org/18089012/diff/10001/chrome/browser/app_controller_mac.h File chrome/browser/app_controller_mac.h (right): https://codereview.chromium.org/18089012/diff/10001/chrome/browser/app_controller_mac.h#newcode85 chrome/browser/app_controller_mac.h:85: base::scoped_nsobject<NSMenuItem> appMenuItem_; On 2013/07/04 02:43:33, tapted wrote: > Probably ...
7 years, 5 months ago (2013-07-05 03:52:37 UTC) #5
tapted
Actually... what do think about doing all of this in extension_app_shim_handler_mac.mm, with a new class, ...
7 years, 5 months ago (2013-07-05 04:50:54 UTC) #6
jackhou1
https://codereview.chromium.org/18089012/diff/17001/chrome/browser/app_controller_mac.mm File chrome/browser/app_controller_mac.mm (right): https://codereview.chromium.org/18089012/diff/17001/chrome/browser/app_controller_mac.mm#newcode198 chrome/browser/app_controller_mac.mm:198: - (void)updateMenuBar:(NSNotification*)notification; On 2013/07/05 04:50:54, tapted wrote: > maybe ...
7 years, 5 months ago (2013-07-05 08:35:13 UTC) #7
jackhou1
I'm not sure about putting this in ExtensionAppShimHandler. I think AppController does most of the ...
7 years, 5 months ago (2013-07-05 08:36:52 UTC) #8
tapted
lgtm
7 years, 5 months ago (2013-07-05 09:02:02 UTC) #9
jackhou1
thakis, what do you think of putting this code here? It doesn't depend on anything ...
7 years, 5 months ago (2013-07-05 12:49:15 UTC) #10
jackhou1
On 2013/07/05 12:49:15, jackhou1 wrote: > thakis, what do you think of putting this code ...
7 years, 5 months ago (2013-07-17 07:36:49 UTC) #11
Nico
On 2013/07/17 07:36:49, jackhou1 wrote: > On 2013/07/05 12:49:15, jackhou1 wrote: > > thakis, what ...
7 years, 5 months ago (2013-07-17 15:37:05 UTC) #12
Nico
…and as always: Tests?
7 years, 5 months ago (2013-07-17 15:37:36 UTC) #13
jackhou1
PTAL. I changed AppControllerPlatformAppBrowserTest to subclass PlatformAppBrowserTest instead of InProcessBrowserTest. Would it be better to ...
7 years, 5 months ago (2013-07-18 06:13:10 UTC) #14
tapted
I was worried you might need an interactive_ui_test, but I like this approach - I ...
7 years, 5 months ago (2013-07-19 03:33:22 UTC) #15
jackhou1
https://codereview.chromium.org/18089012/diff/35001/chrome/browser/app_controller_mac_browsertest.mm File chrome/browser/app_controller_mac_browsertest.mm (right): https://codereview.chromium.org/18089012/diff/35001/chrome/browser/app_controller_mac_browsertest.mm#newcode61 chrome/browser/app_controller_mac_browsertest.mm:61: base::scoped_nsobject<AppController> ac([[AppController alloc] init]); On 2013/07/19 03:33:23, tapted wrote: ...
7 years, 5 months ago (2013-07-19 07:47:16 UTC) #16
tapted
https://codereview.chromium.org/18089012/diff/35001/chrome/browser/app_controller_mac_browsertest.mm File chrome/browser/app_controller_mac_browsertest.mm (right): https://codereview.chromium.org/18089012/diff/35001/chrome/browser/app_controller_mac_browsertest.mm#newcode65 chrome/browser/app_controller_mac_browsertest.mm:65: const extensions::Extension* app_1 = On 2013/07/19 07:47:16, jackhou1 wrote: ...
7 years, 5 months ago (2013-07-19 08:00:41 UTC) #17
Nico
lgtm https://codereview.chromium.org/18089012/diff/43001/chrome/browser/app_controller_mac.h File chrome/browser/app_controller_mac.h (right): https://codereview.chromium.org/18089012/diff/43001/chrome/browser/app_controller_mac.h#newcode85 chrome/browser/app_controller_mac.h:85: // The main menu item showing the name ...
7 years, 5 months ago (2013-07-19 19:43:05 UTC) #18
jackhou1
https://codereview.chromium.org/18089012/diff/43001/chrome/browser/app_controller_mac.h File chrome/browser/app_controller_mac.h (right): https://codereview.chromium.org/18089012/diff/43001/chrome/browser/app_controller_mac.h#newcode85 chrome/browser/app_controller_mac.h:85: // The main menu item showing the name of ...
7 years, 5 months ago (2013-07-21 23:46:12 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jackhou@chromium.org/18089012/50001
7 years, 5 months ago (2013-07-22 03:44:03 UTC) #20
commit-bot: I haz the power
Retried try job too often on linux_chromeos for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_chromeos&number=137790
7 years, 5 months ago (2013-07-22 06:47:11 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jackhou@chromium.org/18089012/50001
7 years, 5 months ago (2013-07-23 01:00:16 UTC) #22
commit-bot: I haz the power
7 years, 5 months ago (2013-07-23 02:31:48 UTC) #23
Message was sent while issue was closed.
Change committed as 213031

Powered by Google App Engine
This is Rietveld 408576698