chore: remove dead code in menu controller (#14939)
This commit is contained in:
parent
a1b2162563
commit
e06bc311a9
1 changed files with 1 additions and 9 deletions
|
@ -279,18 +279,10 @@ static base::scoped_nsobject<NSMenu> recentDocumentsMenuSwap_;
|
||||||
if (model) {
|
if (model) {
|
||||||
BOOL checked = model->IsItemCheckedAt(modelIndex);
|
BOOL checked = model->IsItemCheckedAt(modelIndex);
|
||||||
DCHECK([(id)item isKindOfClass:[NSMenuItem class]]);
|
DCHECK([(id)item isKindOfClass:[NSMenuItem class]]);
|
||||||
|
|
||||||
[(id)item setState:(checked ? NSOnState : NSOffState)];
|
[(id)item setState:(checked ? NSOnState : NSOffState)];
|
||||||
[(id)item setHidden:(!model->IsVisibleAt(modelIndex))];
|
[(id)item setHidden:(!model->IsVisibleAt(modelIndex))];
|
||||||
if (model->IsItemDynamicAt(modelIndex)) {
|
|
||||||
// Update the label and the icon.
|
|
||||||
NSString* label =
|
|
||||||
l10n_util::FixUpWindowsStyleLabel(model->GetLabelAt(modelIndex));
|
|
||||||
[(id)item setTitle:label];
|
|
||||||
|
|
||||||
gfx::Image icon;
|
|
||||||
model->GetIconAt(modelIndex, &icon);
|
|
||||||
[(id)item setImage:icon.IsEmpty() ? nil : icon.ToNSImage()];
|
|
||||||
}
|
|
||||||
return model->IsEnabledAt(modelIndex);
|
return model->IsEnabledAt(modelIndex);
|
||||||
}
|
}
|
||||||
return NO;
|
return NO;
|
||||||
|
|
Loading…
Reference in a new issue