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

Side by Side 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: . 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_DIALOG_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_DIALOG_CONTROLLER_H_
6 #define CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_DIALOG_CONTROLLER_H_ 6 #define CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_DIALOG_CONTROLLER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 10
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 // The title of the dialog view. 66 // The title of the dialog view.
67 string16 GetHeader() const; 67 string16 GetHeader() const;
68 68
69 // Explanatory text directly below the title. 69 // Explanatory text directly below the title.
70 string16 GetSubtext() const; 70 string16 GetSubtext() const;
71 71
72 // Header for unattached devices part of the dialog. 72 // Header for unattached devices part of the dialog.
73 string16 GetUnattachedLocationsHeader() const; 73 string16 GetUnattachedLocationsHeader() const;
74 74
75 // Get the text of the forget context menu command.
76 string16 GetForgetMenuCommand() const;
77
75 // Initial state of whether the dialog's confirmation button will be enabled. 78 // Initial state of whether the dialog's confirmation button will be enabled.
76 bool HasPermittedGalleries() const; 79 bool HasPermittedGalleries() const;
77 80
78 // Get the set of permissions to attached galleries. 81 // Get the set of permissions to attached galleries.
79 virtual GalleryPermissionsVector AttachedPermissions() const; 82 virtual GalleryPermissionsVector AttachedPermissions() const;
80 83
81 // Get the set of permissions to unattached galleries. 84 // Get the set of permissions to unattached galleries.
82 virtual GalleryPermissionsVector UnattachedPermissions() const; 85 virtual GalleryPermissionsVector UnattachedPermissions() const;
83 86
84 // Called when the add-folder button in the dialog is clicked. 87 // Called when the add-folder button in the dialog is clicked.
85 virtual void OnAddFolderClicked(); 88 virtual void OnAddFolderClicked();
86 89
87 // A checkbox beside a gallery permission was checked. The full set 90 // A checkbox beside a gallery permission was checked. The full set
88 // of gallery permissions checkbox settings is sent on every checkbox toggle. 91 // of gallery permissions checkbox settings is sent on every checkbox toggle.
89 virtual void DidToggleGalleryId(MediaGalleryPrefId pref_id, 92 virtual void DidToggleGalleryId(MediaGalleryPrefId pref_id,
90 bool enabled); 93 bool enabled);
91 virtual void DidToggleNewGallery(const MediaGalleryPrefInfo& gallery, 94 virtual void DidToggleNewGallery(const MediaGalleryPrefInfo& gallery,
92 bool enabled); 95 bool enabled);
93 96
97 // The forget command in the context menu was selected.
98 virtual void DidForgetGallery(MediaGalleryPrefId pref_id);
99
94 // The dialog is being deleted. 100 // The dialog is being deleted.
95 virtual void DialogFinished(bool accepted); 101 virtual void DialogFinished(bool accepted);
96 102
97 virtual content::WebContents* web_contents(); 103 virtual content::WebContents* web_contents();
98 104
99 protected: 105 protected:
100 // For use with tests. 106 // For use with tests.
101 explicit MediaGalleriesDialogController( 107 explicit MediaGalleriesDialogController(
102 const extensions::Extension& extension); 108 const extensions::Extension& extension);
103 109
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 190
185 // The view that's showing. 191 // The view that's showing.
186 scoped_ptr<MediaGalleriesDialog> dialog_; 192 scoped_ptr<MediaGalleriesDialog> dialog_;
187 193
188 scoped_refptr<ui::SelectFileDialog> select_folder_dialog_; 194 scoped_refptr<ui::SelectFileDialog> select_folder_dialog_;
189 195
190 DISALLOW_COPY_AND_ASSIGN(MediaGalleriesDialogController); 196 DISALLOW_COPY_AND_ASSIGN(MediaGalleriesDialogController);
191 }; 197 };
192 198
193 #endif // CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_DIALOG_CONTROLLER_H_ 199 #endif // CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_DIALOG_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698