OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_PERMISSION_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_PERMISSION_CONTROLLER_H_ |
6 #define CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_PERMISSION_CONTROLLER_H_ | 6 #define CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_PERMISSION_CONTROLLER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 public: | 54 public: |
55 // The constructor creates a dialog controller which owns itself. | 55 // The constructor creates a dialog controller which owns itself. |
56 MediaGalleriesPermissionController(content::WebContents* web_contents, | 56 MediaGalleriesPermissionController(content::WebContents* web_contents, |
57 const extensions::Extension& extension, | 57 const extensions::Extension& extension, |
58 const base::Closure& on_finish); | 58 const base::Closure& on_finish); |
59 | 59 |
60 // MediaGalleriesDialogController implementation. | 60 // MediaGalleriesDialogController implementation. |
61 base::string16 GetHeader() const override; | 61 base::string16 GetHeader() const override; |
62 base::string16 GetSubtext() const override; | 62 base::string16 GetSubtext() const override; |
63 bool IsAcceptAllowed() const override; | 63 bool IsAcceptAllowed() const override; |
64 bool ShouldShowFolderViewer(const Entry& entry) const override; | |
65 std::vector<base::string16> GetSectionHeaders() const override; | 64 std::vector<base::string16> GetSectionHeaders() const override; |
66 Entries GetSectionEntries(size_t index) const override; | 65 Entries GetSectionEntries(size_t index) const override; |
67 // Auxiliary button for this dialog is the 'Add Folder' button. | 66 // Auxiliary button for this dialog is the 'Add Folder' button. |
68 base::string16 GetAuxiliaryButtonText() const override; | 67 base::string16 GetAuxiliaryButtonText() const override; |
69 void DidClickAuxiliaryButton() override; | 68 void DidClickAuxiliaryButton() override; |
70 void DidToggleEntry(GalleryDialogId gallery_id, bool selected) override; | 69 void DidToggleEntry(GalleryDialogId gallery_id, bool selected) override; |
71 void DidClickOpenFolderViewer(GalleryDialogId gallery_id) override; | |
72 void DidForgetEntry(GalleryDialogId gallery_id) override; | 70 void DidForgetEntry(GalleryDialogId gallery_id) override; |
73 base::string16 GetAcceptButtonText() const override; | 71 base::string16 GetAcceptButtonText() const override; |
74 void DialogFinished(bool accepted) override; | 72 void DialogFinished(bool accepted) override; |
75 ui::MenuModel* GetContextMenu(GalleryDialogId gallery_id) override; | 73 ui::MenuModel* GetContextMenu(GalleryDialogId gallery_id) override; |
76 content::WebContents* WebContents() override; | 74 content::WebContents* WebContents() override; |
77 | 75 |
78 protected: | 76 protected: |
79 friend class MediaGalleriesPermissionControllerTest; | 77 friend class MediaGalleriesPermissionControllerTest; |
80 | 78 |
81 typedef base::Callback<MediaGalleriesDialog* ( | 79 typedef base::Callback<MediaGalleriesDialog* ( |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 | 211 |
214 scoped_ptr<MediaGalleryContextMenu> context_menu_; | 212 scoped_ptr<MediaGalleryContextMenu> context_menu_; |
215 | 213 |
216 // Creates the dialog. Only changed for unit tests. | 214 // Creates the dialog. Only changed for unit tests. |
217 CreateDialogCallback create_dialog_callback_; | 215 CreateDialogCallback create_dialog_callback_; |
218 | 216 |
219 DISALLOW_COPY_AND_ASSIGN(MediaGalleriesPermissionController); | 217 DISALLOW_COPY_AND_ASSIGN(MediaGalleriesPermissionController); |
220 }; | 218 }; |
221 | 219 |
222 #endif // CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_PERMISSION_CONTROLLER_
H_ | 220 #endif // CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_PERMISSION_CONTROLLER_
H_ |
OLD | NEW |