Chromium Code Reviews| Index: chrome/browser/ui/cocoa/extensions/media_galleries_dialog_cocoa.mm |
| =================================================================== |
| --- chrome/browser/ui/cocoa/extensions/media_galleries_dialog_cocoa.mm (revision 181441) |
| +++ chrome/browser/ui/cocoa/extensions/media_galleries_dialog_cocoa.mm (working copy) |
| @@ -215,6 +215,23 @@ |
| [alert_ layout]; |
| } |
| +void MediaGalleriesDialogCocoa::ForgetGallery( |
| + const MediaGalleryPrefInfo* gallery) { |
| + NSUInteger index = 0; |
| + NSString* unique_id = GetUniqueIDForGallery(gallery); |
| + |
| + for (NSButton* button in checkboxes_.get()) { |
| + if ([[[button cell] representedObject] isEqual:unique_id]) { |
| + [checkboxes_ removeObjectAtIndex:index]; |
|
sail
2013/02/08 19:48:22
Hm.. is this ok to do while the iterator is still
Lei Zhang
2013/02/08 20:48:02
Done.
BTW, I changed the test to forget the galle
|
| + UpdateCheckboxContainerFrame(); |
| + [alert_ layout]; |
| + return; |
| + } |
| + ++index; |
| + } |
| + |
| +} |
| + |
| void MediaGalleriesDialogCocoa::OnConstrainedWindowClosed( |
| ConstrainedWindowMac* window) { |
| controller_->DialogFinished(accepted_); |