Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Unified Diff: chrome/browser/ui/cocoa/extensions/media_galleries_dialog_cocoa.mm

Issue 12095074: Media Galleries: Keep media gallery permission dialogs in sync with the gallery (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: merge Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_);

Powered by Google App Engine
This is Rietveld 408576698