Commit 705c3806 authored by Robert Sesek's avatar Robert Sesek Committed by Commit Bot

Remove two IBOutlets for menu items in AppController.

Change-Id: I90ee93d91b83d37eb9618165749455fbe5252422
Reviewed-on: https://chromium-review.googlesource.com/c/1298185Reviewed-by: default avatarLeonard Grey <lgrey@chromium.org>
Commit-Queue: Robert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602447}
parent 72dd53f4
......@@ -80,8 +80,8 @@ class ScopedKeepAlive;
// Outlets for the close tab/window menu items so that we can adjust the
// commmand-key equivalent depending on the kind of window and how many
// tabs it has.
IBOutlet NSMenuItem* closeTabMenuItem_;
IBOutlet NSMenuItem* closeWindowMenuItem_;
NSMenuItem* closeTabMenuItem_;
NSMenuItem* closeWindowMenuItem_;
// If we are expecting a workspace change in response to a reopen
// event, the time we got the event. A null time otherwise.
......
......@@ -378,6 +378,12 @@ static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session;
name:NSWorkspaceWillPowerOffNotification
object:nil];
NSMenu* fileMenu = [[[NSApp mainMenu] itemWithTag:IDC_FILE_MENU] submenu];
closeTabMenuItem_ = [fileMenu itemWithTag:IDC_CLOSE_TAB];
DCHECK(closeTabMenuItem_);
closeWindowMenuItem_ = [fileMenu itemWithTag:IDC_CLOSE_WINDOW];
DCHECK(closeWindowMenuItem_);
// Set up the command updater for when there are no windows open
[self initMenuState];
......
......@@ -126,14 +126,6 @@ base::scoped_nsobject<NSMenuItem> BuildFileMenu(
})
.Build();
// Wire up some legacy IBOutlets.
if (!is_pwa) {
[app_delegate setValue:[[item submenu] itemWithTag:IDC_CLOSE_TAB]
forKey:@"closeTabMenuItem_"];
[app_delegate setValue:[[item submenu] itemWithTag:IDC_CLOSE_WINDOW]
forKey:@"closeWindowMenuItem_"];
}
return item;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment