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_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 <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 class MediaGalleriesDialog { | 24 class MediaGalleriesDialog { |
25 public: | 25 public: |
26 virtual ~MediaGalleriesDialog(); | 26 virtual ~MediaGalleriesDialog(); |
27 | 27 |
28 // Tell the dialog to update its display list of galleries. | 28 // Tell the dialog to update its display list of galleries. |
29 virtual void UpdateGalleries() = 0; | 29 virtual void UpdateGalleries() = 0; |
30 | 30 |
31 // Constructs a platform-specific dialog owned and controlled by |controller|. | 31 // Constructs a platform-specific dialog owned and controlled by |controller|. |
32 static MediaGalleriesDialog* Create( | 32 static MediaGalleriesDialog* Create( |
33 MediaGalleriesDialogController* controller); | 33 MediaGalleriesDialogController* controller); |
| 34 private: |
| 35 friend class TestMediaGalleriesAddScanResultsFunction; |
| 36 |
| 37 virtual void AcceptDialogForTesting() = 0; |
34 }; | 38 }; |
35 | 39 |
36 // Multiple dialog controllers are based on this interface. | 40 // Multiple dialog controllers are based on this interface. |
37 // Implementations of this controller interface are responsible for handling | 41 // Implementations of this controller interface are responsible for handling |
38 // the logic of the dialog and interfacing with the model (i.e., | 42 // the logic of the dialog and interfacing with the model (i.e., |
39 // MediaGalleriesPreferences). It shows the dialog and owns itself. | 43 // MediaGalleriesPreferences). It shows the dialog and owns itself. |
40 class MediaGalleriesDialogController { | 44 class MediaGalleriesDialogController { |
41 public: | 45 public: |
42 struct Entry { | 46 struct Entry { |
43 Entry(const MediaGalleryPrefInfo& pref_info, bool selected) | 47 Entry(const MediaGalleryPrefInfo& pref_info, bool selected) |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 virtual content::WebContents* WebContents() = 0; | 101 virtual content::WebContents* WebContents() = 0; |
98 | 102 |
99 protected: | 103 protected: |
100 MediaGalleriesDialogController(); | 104 MediaGalleriesDialogController(); |
101 virtual ~MediaGalleriesDialogController(); | 105 virtual ~MediaGalleriesDialogController(); |
102 | 106 |
103 DISALLOW_COPY_AND_ASSIGN(MediaGalleriesDialogController); | 107 DISALLOW_COPY_AND_ASSIGN(MediaGalleriesDialogController); |
104 }; | 108 }; |
105 | 109 |
106 #endif // CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_DIALOG_CONTROLLER_H_ | 110 #endif // CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_DIALOG_CONTROLLER_H_ |
OLD | NEW |