| 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_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 10 matching lines...) Expand all Loading... |
| 21 } | 21 } |
| 22 | 22 |
| 23 namespace extensions { | 23 namespace extensions { |
| 24 class Extension; | 24 class Extension; |
| 25 } | 25 } |
| 26 | 26 |
| 27 namespace ui { | 27 namespace ui { |
| 28 class MenuModel; | 28 class MenuModel; |
| 29 } | 29 } |
| 30 | 30 |
| 31 class GalleryContextMenuModel; | |
| 32 class MediaGalleriesDialogController; | 31 class MediaGalleriesDialogController; |
| 32 class MediaGalleryContextMenu; |
| 33 class Profile; | 33 class Profile; |
| 34 | 34 |
| 35 // The view. | 35 // The view. |
| 36 class MediaGalleriesDialog { | 36 class MediaGalleriesDialog { |
| 37 public: | 37 public: |
| 38 virtual ~MediaGalleriesDialog(); | 38 virtual ~MediaGalleriesDialog(); |
| 39 | 39 |
| 40 // Tell the dialog to update its display list of galleries. | 40 // Tell the dialog to update its display list of galleries. |
| 41 virtual void UpdateGalleries() = 0; | 41 virtual void UpdateGalleries() = 0; |
| 42 | 42 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 bool enabled); | 98 bool enabled); |
| 99 | 99 |
| 100 // The forget command in the context menu was selected. | 100 // The forget command in the context menu was selected. |
| 101 virtual void DidForgetGallery(MediaGalleryPrefId pref_id); | 101 virtual void DidForgetGallery(MediaGalleryPrefId pref_id); |
| 102 | 102 |
| 103 // The dialog is being deleted. | 103 // The dialog is being deleted. |
| 104 virtual void DialogFinished(bool accepted); | 104 virtual void DialogFinished(bool accepted); |
| 105 | 105 |
| 106 virtual content::WebContents* web_contents(); | 106 virtual content::WebContents* web_contents(); |
| 107 | 107 |
| 108 ui::MenuModel* GetContextMenuModel(MediaGalleryPrefId id); | 108 ui::MenuModel* GetContextMenu(MediaGalleryPrefId id); |
| 109 | 109 |
| 110 protected: | 110 protected: |
| 111 // For use with tests. | 111 // For use with tests. |
| 112 explicit MediaGalleriesDialogController( | 112 explicit MediaGalleriesDialogController( |
| 113 const extensions::Extension& extension); | 113 const extensions::Extension& extension); |
| 114 | 114 |
| 115 virtual ~MediaGalleriesDialogController(); | 115 virtual ~MediaGalleriesDialogController(); |
| 116 | 116 |
| 117 private: | 117 private: |
| 118 // This type keeps track of media galleries already known to the prefs system. | 118 // This type keeps track of media galleries already known to the prefs system. |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 | 193 |
| 194 // The model that tracks galleries and extensions' permissions. | 194 // The model that tracks galleries and extensions' permissions. |
| 195 // This is the authoritative source for gallery information. | 195 // This is the authoritative source for gallery information. |
| 196 MediaGalleriesPreferences* preferences_; | 196 MediaGalleriesPreferences* preferences_; |
| 197 | 197 |
| 198 // The view that's showing. | 198 // The view that's showing. |
| 199 scoped_ptr<MediaGalleriesDialog> dialog_; | 199 scoped_ptr<MediaGalleriesDialog> dialog_; |
| 200 | 200 |
| 201 scoped_refptr<ui::SelectFileDialog> select_folder_dialog_; | 201 scoped_refptr<ui::SelectFileDialog> select_folder_dialog_; |
| 202 | 202 |
| 203 scoped_ptr<ui::MenuModel> context_menu_model_; | 203 scoped_ptr<MediaGalleryContextMenu> context_menu_; |
| 204 scoped_ptr<GalleryContextMenuModel> gallery_menu_model_; | |
| 205 | 204 |
| 206 DISALLOW_COPY_AND_ASSIGN(MediaGalleriesDialogController); | 205 DISALLOW_COPY_AND_ASSIGN(MediaGalleriesDialogController); |
| 207 }; | 206 }; |
| 208 | 207 |
| 209 #endif // CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_DIALOG_CONTROLLER_H_ | 208 #endif // CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_DIALOG_CONTROLLER_H_ |
| OLD | NEW |