summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa
diff options
context:
space:
mode:
authorrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-27 20:00:01 +0000
committerrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-27 20:00:01 +0000
commit29f8598a0ab092fbb5eb9eea8676ae22f5ce1fbf (patch)
tree83a8b6ab114f424546ba5b60a2cac8069191bcf0 /chrome/browser/cocoa
parent079548b6cea329582d60143cc18f00a59a6cc4cd (diff)
downloadchromium_src-29f8598a0ab092fbb5eb9eea8676ae22f5ce1fbf.zip
chromium_src-29f8598a0ab092fbb5eb9eea8676ae22f5ce1fbf.tar.gz
chromium_src-29f8598a0ab092fbb5eb9eea8676ae22f5ce1fbf.tar.bz2
[Mac] Do not insert an "About Chrome" item when the Wrench menu shows an available update.
Changes to the WrenchMenuModel have made |-[WrenchMenuController insertUpdateAvailableItem]| obsolete. The Upgrade item is now inserted when the menu is built but is just marked as hidden; the About item is now distinct and never inserted on Mac. BUG=56023 TEST=Be out of date with 1 window open. Wait for the upgrade ball to appear. Open the Wrench menu and do not see an "About Chrome" item. Review URL: http://codereview.chromium.org/3455027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60695 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa')
-rw-r--r--chrome/browser/cocoa/toolbar_controller.mm2
-rw-r--r--chrome/browser/cocoa/wrench_menu_controller.h3
-rw-r--r--chrome/browser/cocoa/wrench_menu_controller.mm30
3 files changed, 0 insertions, 35 deletions
diff --git a/chrome/browser/cocoa/toolbar_controller.mm b/chrome/browser/cocoa/toolbar_controller.mm
index f9c9b8a..1d37b09 100644
--- a/chrome/browser/cocoa/toolbar_controller.mm
+++ b/chrome/browser/cocoa/toolbar_controller.mm
@@ -545,8 +545,6 @@ class NotificationBridge : public NotificationObserver {
[overlayImage unlockFocus];
[[wrenchButton_ cell] setOverlayImage:overlayImage];
-
- [wrenchMenuController_ insertUpdateAvailableItem];
}
- (void)prefChanged:(std::string*)prefName {
diff --git a/chrome/browser/cocoa/wrench_menu_controller.h b/chrome/browser/cocoa/wrench_menu_controller.h
index 99f3743..bbfa995 100644
--- a/chrome/browser/cocoa/wrench_menu_controller.h
+++ b/chrome/browser/cocoa/wrench_menu_controller.h
@@ -55,9 +55,6 @@ class ZoomLevelObserver;
// Returns the weak reference to the WrenchMenuModel.
- (WrenchMenuModel*)wrenchMenuModel;
-// Inserts the update available notification menu item.
-- (void)insertUpdateAvailableItem;
-
@end
////////////////////////////////////////////////////////////////////////////////
diff --git a/chrome/browser/cocoa/wrench_menu_controller.mm b/chrome/browser/cocoa/wrench_menu_controller.mm
index 4966157..3c76d92 100644
--- a/chrome/browser/cocoa/wrench_menu_controller.mm
+++ b/chrome/browser/cocoa/wrench_menu_controller.mm
@@ -169,36 +169,6 @@ class ZoomLevelObserver : public NotificationObserver {
return static_cast<WrenchMenuModel*>(model_);
}
-// Inserts the update available notification menu item.
-- (void)insertUpdateAvailableItem {
- WrenchMenuModel* model = [self wrenchMenuModel];
- // Don't insert the item multiple times.
- if (!model || model->GetIndexOfCommandId(IDC_ABOUT) != -1)
- return;
-
- // Update the model manually because the model is static because other
- // platforms always have an About item.
- int index = model->GetIndexOfCommandId(IDC_OPTIONS) + 1;
- model->InsertItemAt(index, IDC_ABOUT,
- l10n_util::GetStringFUTF16(IDS_ABOUT,
- l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)));
-
- // The model does not broadcast change notifications to its delegate, so
- // insert the actual menu item ourselves.
- NSInteger menuIndex = [[self menu] indexOfItemWithTag:index];
- [self addItemToMenu:[self menu]
- atIndex:menuIndex
- fromModel:model
- modelIndex:index];
-
- // Since the tag of each menu item is the index within the model, they need
- // to be adjusted after insertion.
- for (NSInteger i = menuIndex + 1; i < [[self menu] numberOfItems]; ++i) {
- NSMenuItem* item = [[self menu] itemAtIndex:i];
- [item setTag:[item tag] + 1];
- }
-}
-
// Fit the localized strings into the Cut/Copy/Paste control, then resize the
// whole menu item accordingly.
- (void)adjustPositioning {