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

Side by Side Diff: chrome/browser/media_gallery/media_galleries_dialog_controller.h

Issue 10834242: Cocoa: Implement media gallery dialog (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix build Created 8 years, 4 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 | Annotate | Revision Log
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_GALLERY_MEDIA_GALLERIES_DIALOG_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_MEDIA_GALLERY_MEDIA_GALLERIES_DIALOG_CONTROLLER_H_
6 #define CHROME_BROWSER_MEDIA_GALLERY_MEDIA_GALLERIES_DIALOG_CONTROLLER_H_ 6 #define CHROME_BROWSER_MEDIA_GALLERY_MEDIA_GALLERIES_DIALOG_CONTROLLER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 // This type keeps track of media galleries already known to the prefs system. 59 // This type keeps track of media galleries already known to the prefs system.
60 typedef std::map<MediaGalleryPrefId, GalleryPermission> 60 typedef std::map<MediaGalleryPrefId, GalleryPermission>
61 KnownGalleryPermissions; 61 KnownGalleryPermissions;
62 62
63 // The constructor creates a dialog controller which owns itself. 63 // The constructor creates a dialog controller which owns itself.
64 MediaGalleriesDialogController(TabContents* tab_contents, 64 MediaGalleriesDialogController(TabContents* tab_contents,
65 const extensions::Extension& extension, 65 const extensions::Extension& extension,
66 const base::Callback<void(void)>& on_finish); 66 const base::Callback<void(void)>& on_finish);
67 67
68 // Called by the view. 68 // Called by the view.
69 string16 GetHeader(); 69 string16 GetHeader() const;
70 string16 GetSubtext(); 70 string16 GetSubtext() const;
71 bool HasPermittedGalleries() const;
71 void OnAddFolderClicked(); 72 void OnAddFolderClicked();
72 void GalleryToggled(const MediaGalleryPrefInfo* pref_info, bool enabled); 73 void DidToggleGallery(const MediaGalleryPrefInfo* pref_info, bool enabled);
73 void DialogFinished(bool accepted); 74 void DialogFinished(bool accepted);
74 75
75 // SelectFileDialog::Listener implementation: 76 // SelectFileDialog::Listener implementation:
76 virtual void FileSelected(const FilePath& path, 77 virtual void FileSelected(const FilePath& path,
77 int index, 78 int index,
78 void* params) OVERRIDE; 79 void* params) OVERRIDE;
79 const KnownGalleryPermissions& permissions() const { 80 const KnownGalleryPermissions& permissions() const {
80 return known_galleries_; 81 return known_galleries_;
81 } 82 }
82 83
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 scoped_ptr<MediaGalleriesDialog> dialog_; 122 scoped_ptr<MediaGalleriesDialog> dialog_;
122 123
123 scoped_refptr<ui::SelectFileDialog> select_folder_dialog_; 124 scoped_refptr<ui::SelectFileDialog> select_folder_dialog_;
124 125
125 DISALLOW_COPY_AND_ASSIGN(MediaGalleriesDialogController); 126 DISALLOW_COPY_AND_ASSIGN(MediaGalleriesDialogController);
126 }; 127 };
127 128
128 } // namespace chrome 129 } // namespace chrome
129 130
130 #endif // CHROME_BROWSER_MEDIA_GALLERY_MEDIA_GALLERIES_DIALOG_CONTROLLER_H_ 131 #endif // CHROME_BROWSER_MEDIA_GALLERY_MEDIA_GALLERIES_DIALOG_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698