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

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 mac 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 virtual void GalleryToggled(const MediaGalleryPrefInfo* pref_info, 73 virtual void DidToggleGallery(const MediaGalleryPrefInfo* pref_info,
73 bool enabled); 74 bool enabled);
74 virtual void DialogFinished(bool accepted); 75 virtual void DialogFinished(bool accepted);
75 76
76 // SelectFileDialog::Listener implementation: 77 // SelectFileDialog::Listener implementation:
77 virtual void FileSelected(const FilePath& path, 78 virtual void FileSelected(const FilePath& path,
78 int index, 79 int index,
79 void* params) OVERRIDE; 80 void* params) OVERRIDE;
80 const KnownGalleryPermissions& permissions() const { 81 const KnownGalleryPermissions& permissions() const {
81 return known_galleries_; 82 return known_galleries_;
82 } 83 }
83 84
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 scoped_ptr<MediaGalleriesDialog> dialog_; 128 scoped_ptr<MediaGalleriesDialog> dialog_;
128 129
129 scoped_refptr<ui::SelectFileDialog> select_folder_dialog_; 130 scoped_refptr<ui::SelectFileDialog> select_folder_dialog_;
130 131
131 DISALLOW_COPY_AND_ASSIGN(MediaGalleriesDialogController); 132 DISALLOW_COPY_AND_ASSIGN(MediaGalleriesDialogController);
132 }; 133 };
133 134
134 } // namespace chrome 135 } // namespace chrome
135 136
136 #endif // CHROME_BROWSER_MEDIA_GALLERY_MEDIA_GALLERIES_DIALOG_CONTROLLER_H_ 137 #endif // CHROME_BROWSER_MEDIA_GALLERY_MEDIA_GALLERIES_DIALOG_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698