summaryrefslogtreecommitdiffstats
path: root/chrome/browser/app_controller_mac.mm
diff options
context:
space:
mode:
authorrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-15 04:33:48 +0000
committerrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-15 04:33:48 +0000
commit3a90b45428982c2f69b8e9256adb548fb92478c5 (patch)
tree3cb52ef5fab75a2228f545b4ca1d2a3842f000d9 /chrome/browser/app_controller_mac.mm
parent4e60380923bb0ceb65bb6a02117784bd3e9f5f27 (diff)
downloadchromium_src-3a90b45428982c2f69b8e9256adb548fb92478c5.zip
chromium_src-3a90b45428982c2f69b8e9256adb548fb92478c5.tar.gz
chromium_src-3a90b45428982c2f69b8e9256adb548fb92478c5.tar.bz2
[Mac] Fix background apps dock menu.
BUG=175113 Review URL: https://chromiumcodereview.appspot.com/12259032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182616 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/app_controller_mac.mm')
-rw-r--r--chrome/browser/app_controller_mac.mm17
1 files changed, 7 insertions, 10 deletions
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm
index a6425a0..6dae21a 100644
--- a/chrome/browser/app_controller_mac.mm
+++ b/chrome/browser/app_controller_mac.mm
@@ -807,6 +807,8 @@ void RecordLastRunAppBundlePath() {
} else if (action == @selector(toggleConfirmToQuit:)) {
[self updateConfirmToQuitPrefMenuItem:static_cast<NSMenuItem*>(item)];
enable = YES;
+ } else if (action == @selector(executeApplication:)) {
+ enable = YES;
}
return enable;
}
@@ -932,12 +934,6 @@ void RecordLastRunAppBundlePath() {
case IDC_OPTIONS:
[self showPreferences:sender];
break;
- default:
- // Background Applications use dynamic values that must be less than the
- // smallest value among the predefined IDC_* labels.
- if ([sender tag] < IDC_MinimumLabelValue)
- [self executeApplication:sender];
- break;
}
}
@@ -1287,7 +1283,7 @@ void RecordLastRunAppBundlePath() {
l10n_util::GetNSStringWithFixup(IDS_BACKGROUND_APPS_MAC);
scoped_nsobject<NSMenu> appMenu([[NSMenu alloc] initWithTitle:menuStr]);
for (extensions::ExtensionList::const_iterator cursor =
- applications.begin();
+ applications.begin();
cursor != applications.end();
++cursor, ++position) {
DCHECK_EQ(applications.GetPosition(*cursor), position);
@@ -1295,18 +1291,19 @@ void RecordLastRunAppBundlePath() {
base::SysUTF16ToNSString(UTF8ToUTF16((*cursor)->name()));
scoped_nsobject<NSMenuItem> appItem([[NSMenuItem alloc]
initWithTitle:itemStr
- action:@selector(commandFromDock:)
+ action:@selector(executeApplication:)
keyEquivalent:@""]);
[appItem setTarget:self];
[appItem setTag:position];
[appMenu addItem:appItem];
}
+
scoped_nsobject<NSMenuItem> appMenuItem([[NSMenuItem alloc]
initWithTitle:menuStr
- action:@selector(commandFromDock:)
+ action:@selector(executeApplication:)
keyEquivalent:@""]);
[appMenuItem setTarget:self];
- [appMenuItem setTag:position];
+ [appMenuItem setTag:IDC_VIEW_BACKGROUND_PAGES];
[appMenuItem setSubmenu:appMenu];
[dockMenu addItem:appMenuItem];
}