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

Unified Diff: chrome/browser/media_galleries/media_galleries_dialog_controller.h

Issue 37553002: [MediaGalleries] Add context menu for forgetting galleries. [views] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dlgfix
Patch Set: DidForgetGallery Created 7 years, 2 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/media_galleries/media_galleries_dialog_controller.h
diff --git a/chrome/browser/media_galleries/media_galleries_dialog_controller.h b/chrome/browser/media_galleries/media_galleries_dialog_controller.h
index cc44f0c977b84798236c2b1ecee5469b099151bc..a5e24f3c0cdd52d3ca794ee6fb014e156c1c933f 100644
--- a/chrome/browser/media_galleries/media_galleries_dialog_controller.h
+++ b/chrome/browser/media_galleries/media_galleries_dialog_controller.h
@@ -24,6 +24,11 @@ namespace extensions {
class Extension;
}
+namespace ui {
+class MenuModel;
+}
+
+class GalleryContextMenuModel;
class MediaGalleriesDialogController;
// The view.
@@ -72,6 +77,9 @@ class MediaGalleriesDialogController
// Header for unattached devices part of the dialog.
string16 GetUnattachedLocationsHeader() const;
+ // Get the text of the forget context menu command.
+ string16 GetDeleteMenuCommand() const;
+
// Initial state of whether the dialog's confirmation button will be enabled.
bool HasPermittedGalleries() const;
@@ -91,11 +99,16 @@ class MediaGalleriesDialogController
virtual void DidToggleNewGallery(const MediaGalleryPrefInfo& gallery,
bool enabled);
+ // The forget command in the context menu was selected.
+ virtual void DidForgetGallery(MediaGalleryPrefId pref_id);
+
// The dialog is being deleted.
virtual void DialogFinished(bool accepted);
virtual content::WebContents* web_contents();
+ ui::MenuModel* GetContextMenuModel(MediaGalleryPrefId id);
+
protected:
// For use with tests.
explicit MediaGalleriesDialogController(
@@ -187,6 +200,9 @@ class MediaGalleriesDialogController
scoped_refptr<ui::SelectFileDialog> select_folder_dialog_;
+ scoped_ptr<ui::MenuModel> context_menu_model_;
+ scoped_ptr<GalleryContextMenuModel> gallery_menu_model_;
+
DISALLOW_COPY_AND_ASSIGN(MediaGalleriesDialogController);
};

Powered by Google App Engine
This is Rietveld 408576698