| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |