| 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 12 matching lines...) Expand all Loading... |
| 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; | 31 class GalleryContextMenuModel; |
| 32 class MediaGalleriesDialogController; | 32 class MediaGalleriesDialogController; |
| 33 class Profile; |
| 33 | 34 |
| 34 // The view. | 35 // The view. |
| 35 class MediaGalleriesDialog { | 36 class MediaGalleriesDialog { |
| 36 public: | 37 public: |
| 37 virtual ~MediaGalleriesDialog(); | 38 virtual ~MediaGalleriesDialog(); |
| 38 | 39 |
| 39 // Tell the dialog to update its display list of galleries. | 40 // Tell the dialog to update its display list of galleries. |
| 40 virtual void UpdateGalleries() = 0; | 41 virtual void UpdateGalleries() = 0; |
| 41 | 42 |
| 42 // Constructs a platform-specific dialog owned and controlled by |controller|. | 43 // Constructs a platform-specific dialog owned and controlled by |controller|. |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 void UpdateGalleriesOnPreferencesEvent(); | 161 void UpdateGalleriesOnPreferencesEvent(); |
| 161 | 162 |
| 162 // Updates the model and view when a device is attached or detached. | 163 // Updates the model and view when a device is attached or detached. |
| 163 void UpdateGalleriesOnDeviceEvent(const std::string& device_id); | 164 void UpdateGalleriesOnDeviceEvent(const std::string& device_id); |
| 164 | 165 |
| 165 // Fill |permissions| with a sorted list of either attached or unattached | 166 // Fill |permissions| with a sorted list of either attached or unattached |
| 166 // gallery permissions. | 167 // gallery permissions. |
| 167 void FillPermissions(bool attached, | 168 void FillPermissions(bool attached, |
| 168 GalleryPermissionsVector* permissions) const; | 169 GalleryPermissionsVector* permissions) const; |
| 169 | 170 |
| 171 Profile* GetProfile(); |
| 172 |
| 170 // The web contents from which the request originated. | 173 // The web contents from which the request originated. |
| 171 content::WebContents* web_contents_; | 174 content::WebContents* web_contents_; |
| 172 | 175 |
| 173 // This is just a reference, but it's assumed that it won't become invalid | 176 // This is just a reference, but it's assumed that it won't become invalid |
| 174 // while the dialog is showing. | 177 // while the dialog is showing. |
| 175 const extensions::Extension* extension_; | 178 const extensions::Extension* extension_; |
| 176 | 179 |
| 177 // This map excludes those galleries which have been blacklisted; it only | 180 // This map excludes those galleries which have been blacklisted; it only |
| 178 // counts active known galleries. | 181 // counts active known galleries. |
| 179 KnownGalleryPermissions known_galleries_; | 182 KnownGalleryPermissions known_galleries_; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 197 | 200 |
| 198 scoped_refptr<ui::SelectFileDialog> select_folder_dialog_; | 201 scoped_refptr<ui::SelectFileDialog> select_folder_dialog_; |
| 199 | 202 |
| 200 scoped_ptr<ui::MenuModel> context_menu_model_; | 203 scoped_ptr<ui::MenuModel> context_menu_model_; |
| 201 scoped_ptr<GalleryContextMenuModel> gallery_menu_model_; | 204 scoped_ptr<GalleryContextMenuModel> gallery_menu_model_; |
| 202 | 205 |
| 203 DISALLOW_COPY_AND_ASSIGN(MediaGalleriesDialogController); | 206 DISALLOW_COPY_AND_ASSIGN(MediaGalleriesDialogController); |
| 204 }; | 207 }; |
| 205 | 208 |
| 206 #endif // CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_DIALOG_CONTROLLER_H_ | 209 #endif // CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_DIALOG_CONTROLLER_H_ |
| OLD | NEW |