| 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/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| 11 #include "ui/base/window_open_disposition.h" | 11 #include "ui/base/window_open_disposition.h" |
| 12 | 12 |
| 13 class ConfirmInfoBarDelegate; | 13 class ConfirmInfoBarDelegate; |
| 14 class HungRendererInfoBarDelegate; | 14 class HungRendererInfoBarDelegate; |
| 15 class InsecureContentInfoBarDelegate; | 15 class InsecureContentInfoBarDelegate; |
| 16 class NativeAppInfoBarDelegate; | 16 class NativeAppInfoBarDelegate; |
| 17 class PermissionInfoBarDelegate; | 17 class PermissionInfoBarDelegate; |
| 18 class PopupBlockedInfoBarDelegate; | 18 class PopupBlockedInfoBarDelegate; |
| 19 class RegisterProtocolHandlerInfoBarDelegate; | 19 class RegisterProtocolHandlerInfoBarDelegate; |
| 20 class ScreenCaptureInfoBarDelegate; | 20 class ScreenCaptureInfoBarDelegate; |
| 21 class ThemeInstalledInfoBarDelegate; | 21 class ThemeInstalledInfoBarDelegate; |
| 22 class ThreeDAPIInfoBarDelegate; | 22 class ThreeDAPIInfoBarDelegate; |
| 23 | 23 |
| 24 #if defined(OS_ANDROID) | 24 #if defined(OS_ANDROID) |
| 25 namespace banners { |
| 26 class AppBannerInfoBarDelegateAndroid; |
| 27 } |
| 25 class MediaStreamInfoBarDelegateAndroid; | 28 class MediaStreamInfoBarDelegateAndroid; |
| 26 class MediaThrottleInfoBarDelegate; | 29 class MediaThrottleInfoBarDelegate; |
| 27 #endif | 30 #endif |
| 28 | 31 |
| 29 namespace translate { | 32 namespace translate { |
| 30 class TranslateInfoBarDelegate; | 33 class TranslateInfoBarDelegate; |
| 31 } | 34 } |
| 32 | 35 |
| 33 namespace gfx { | 36 namespace gfx { |
| 34 class Image; | 37 class Image; |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 virtual NativeAppInfoBarDelegate* AsNativeAppInfoBarDelegate(); | 212 virtual NativeAppInfoBarDelegate* AsNativeAppInfoBarDelegate(); |
| 210 virtual PermissionInfoBarDelegate* AsPermissionInfoBarDelegate(); | 213 virtual PermissionInfoBarDelegate* AsPermissionInfoBarDelegate(); |
| 211 virtual PopupBlockedInfoBarDelegate* AsPopupBlockedInfoBarDelegate(); | 214 virtual PopupBlockedInfoBarDelegate* AsPopupBlockedInfoBarDelegate(); |
| 212 virtual RegisterProtocolHandlerInfoBarDelegate* | 215 virtual RegisterProtocolHandlerInfoBarDelegate* |
| 213 AsRegisterProtocolHandlerInfoBarDelegate(); | 216 AsRegisterProtocolHandlerInfoBarDelegate(); |
| 214 virtual ScreenCaptureInfoBarDelegate* AsScreenCaptureInfoBarDelegate(); | 217 virtual ScreenCaptureInfoBarDelegate* AsScreenCaptureInfoBarDelegate(); |
| 215 virtual ThemeInstalledInfoBarDelegate* AsThemePreviewInfobarDelegate(); | 218 virtual ThemeInstalledInfoBarDelegate* AsThemePreviewInfobarDelegate(); |
| 216 virtual ThreeDAPIInfoBarDelegate* AsThreeDAPIInfoBarDelegate(); | 219 virtual ThreeDAPIInfoBarDelegate* AsThreeDAPIInfoBarDelegate(); |
| 217 virtual translate::TranslateInfoBarDelegate* AsTranslateInfoBarDelegate(); | 220 virtual translate::TranslateInfoBarDelegate* AsTranslateInfoBarDelegate(); |
| 218 #if defined(OS_ANDROID) | 221 #if defined(OS_ANDROID) |
| 222 virtual banners::AppBannerInfoBarDelegateAndroid* |
| 223 AsAppBannerInfoBarDelegateAndroid(); |
| 219 virtual MediaStreamInfoBarDelegateAndroid* | 224 virtual MediaStreamInfoBarDelegateAndroid* |
| 220 AsMediaStreamInfoBarDelegateAndroid(); | 225 AsMediaStreamInfoBarDelegateAndroid(); |
| 221 virtual MediaThrottleInfoBarDelegate* AsMediaThrottleInfoBarDelegate(); | 226 virtual MediaThrottleInfoBarDelegate* AsMediaThrottleInfoBarDelegate(); |
| 222 #endif | 227 #endif |
| 223 | 228 |
| 224 void set_infobar(InfoBar* infobar) { infobar_ = infobar; } | 229 void set_infobar(InfoBar* infobar) { infobar_ = infobar; } |
| 225 void set_nav_entry_id(int nav_entry_id) { nav_entry_id_ = nav_entry_id; } | 230 void set_nav_entry_id(int nav_entry_id) { nav_entry_id_ = nav_entry_id; } |
| 226 | 231 |
| 227 protected: | 232 protected: |
| 228 InfoBarDelegate(); | 233 InfoBarDelegate(); |
| 229 | 234 |
| 230 InfoBar* infobar() { return infobar_; } | 235 InfoBar* infobar() { return infobar_; } |
| 231 | 236 |
| 232 private: | 237 private: |
| 233 // The InfoBar associated with us. | 238 // The InfoBar associated with us. |
| 234 InfoBar* infobar_; | 239 InfoBar* infobar_; |
| 235 | 240 |
| 236 // The ID of the active navigation entry at the time we became owned. | 241 // The ID of the active navigation entry at the time we became owned. |
| 237 int nav_entry_id_; | 242 int nav_entry_id_; |
| 238 | 243 |
| 239 DISALLOW_COPY_AND_ASSIGN(InfoBarDelegate); | 244 DISALLOW_COPY_AND_ASSIGN(InfoBarDelegate); |
| 240 }; | 245 }; |
| 241 | 246 |
| 242 } // namespace infobars | 247 } // namespace infobars |
| 243 | 248 |
| 244 #endif // COMPONENTS_INFOBARS_CORE_INFOBAR_DELEGATE_H_ | 249 #endif // COMPONENTS_INFOBARS_CORE_INFOBAR_DELEGATE_H_ |
| OLD | NEW |