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 COMPONENTS_INFOBARS_CORE_INFOBAR_DELEGATE_H_ | 5 #ifndef COMPONENTS_INFOBARS_CORE_INFOBAR_DELEGATE_H_ |
6 #define COMPONENTS_INFOBARS_CORE_INFOBAR_DELEGATE_H_ | 6 #define COMPONENTS_INFOBARS_CORE_INFOBAR_DELEGATE_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
10 #include "ui/base/window_open_disposition.h" | 10 #include "ui/base/window_open_disposition.h" |
11 | 11 |
12 class AutoLoginInfoBarDelegate; | 12 class AutoLoginInfoBarDelegate; |
13 class ConfirmInfoBarDelegate; | 13 class ConfirmInfoBarDelegate; |
14 class ExtensionInfoBarDelegate; | 14 class ExtensionInfoBarDelegate; |
15 class InsecureContentInfoBarDelegate; | 15 class InsecureContentInfoBarDelegate; |
16 class MediaStreamInfoBarDelegate; | 16 class MediaStreamInfoBarDelegate; |
17 class PopupBlockedInfoBarDelegate; | 17 class PopupBlockedInfoBarDelegate; |
18 class RegisterProtocolHandlerInfoBarDelegate; | 18 class RegisterProtocolHandlerInfoBarDelegate; |
19 class ScreenCaptureInfoBarDelegate; | 19 class ScreenCaptureInfoBarDelegate; |
20 class ThemeInstalledInfoBarDelegate; | 20 class ThemeInstalledInfoBarDelegate; |
21 class ThreeDAPIInfoBarDelegate; | 21 class ThreeDAPIInfoBarDelegate; |
22 | 22 |
| 23 #if defined(OS_ANDROID) |
| 24 namespace chrome { |
| 25 namespace android { |
| 26 class DownloadOverwriteInfoBarDelegate; |
| 27 } |
| 28 } |
| 29 #endif |
| 30 |
23 namespace translate { | 31 namespace translate { |
24 class TranslateInfoBarDelegate; | 32 class TranslateInfoBarDelegate; |
25 } | 33 } |
26 | 34 |
27 namespace gfx { | 35 namespace gfx { |
28 class Image; | 36 class Image; |
29 } | 37 } |
30 | 38 |
31 namespace infobars { | 39 namespace infobars { |
32 | 40 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 virtual ExtensionInfoBarDelegate* AsExtensionInfoBarDelegate(); | 117 virtual ExtensionInfoBarDelegate* AsExtensionInfoBarDelegate(); |
110 virtual InsecureContentInfoBarDelegate* AsInsecureContentInfoBarDelegate(); | 118 virtual InsecureContentInfoBarDelegate* AsInsecureContentInfoBarDelegate(); |
111 virtual MediaStreamInfoBarDelegate* AsMediaStreamInfoBarDelegate(); | 119 virtual MediaStreamInfoBarDelegate* AsMediaStreamInfoBarDelegate(); |
112 virtual PopupBlockedInfoBarDelegate* AsPopupBlockedInfoBarDelegate(); | 120 virtual PopupBlockedInfoBarDelegate* AsPopupBlockedInfoBarDelegate(); |
113 virtual RegisterProtocolHandlerInfoBarDelegate* | 121 virtual RegisterProtocolHandlerInfoBarDelegate* |
114 AsRegisterProtocolHandlerInfoBarDelegate(); | 122 AsRegisterProtocolHandlerInfoBarDelegate(); |
115 virtual ScreenCaptureInfoBarDelegate* AsScreenCaptureInfoBarDelegate(); | 123 virtual ScreenCaptureInfoBarDelegate* AsScreenCaptureInfoBarDelegate(); |
116 virtual ThemeInstalledInfoBarDelegate* AsThemePreviewInfobarDelegate(); | 124 virtual ThemeInstalledInfoBarDelegate* AsThemePreviewInfobarDelegate(); |
117 virtual translate::TranslateInfoBarDelegate* AsTranslateInfoBarDelegate(); | 125 virtual translate::TranslateInfoBarDelegate* AsTranslateInfoBarDelegate(); |
118 | 126 |
| 127 #if defined(OS_ANDROID) |
| 128 virtual chrome::android::DownloadOverwriteInfoBarDelegate* |
| 129 AsDownloadOverwriteInfoBarDelegate(); |
| 130 #endif |
| 131 |
119 void set_infobar(InfoBar* infobar) { infobar_ = infobar; } | 132 void set_infobar(InfoBar* infobar) { infobar_ = infobar; } |
120 | 133 |
121 // Store the unique id for the active entry, to be used later upon navigation | 134 // Store the unique id for the active entry, to be used later upon navigation |
122 // to determine if this InfoBarDelegate should be expired. | 135 // to determine if this InfoBarDelegate should be expired. |
123 void StoreActiveEntryUniqueID(); | 136 void StoreActiveEntryUniqueID(); |
124 | 137 |
125 // Return the icon to be shown for this InfoBar. If the returned Image is | 138 // Return the icon to be shown for this InfoBar. If the returned Image is |
126 // empty, no icon is shown. | 139 // empty, no icon is shown. |
127 virtual gfx::Image GetIcon() const; | 140 virtual gfx::Image GetIcon() const; |
128 | 141 |
(...skipping 13 matching lines...) Expand all Loading... |
142 | 155 |
143 // The InfoBar associated with us. | 156 // The InfoBar associated with us. |
144 InfoBar* infobar_; | 157 InfoBar* infobar_; |
145 | 158 |
146 DISALLOW_COPY_AND_ASSIGN(InfoBarDelegate); | 159 DISALLOW_COPY_AND_ASSIGN(InfoBarDelegate); |
147 }; | 160 }; |
148 | 161 |
149 } // namespace infobars | 162 } // namespace infobars |
150 | 163 |
151 #endif // COMPONENTS_INFOBARS_CORE_INFOBAR_DELEGATE_H_ | 164 #endif // COMPONENTS_INFOBARS_CORE_INFOBAR_DELEGATE_H_ |
OLD | NEW |