| 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 class MediaStreamInfoBarDelegateAndroid; | 25 class MediaStreamInfoBarDelegateAndroid; |
| 26 class MediaThrottleInfoBarDelegate; | |
| 27 | 26 |
| 28 namespace offline_pages { | 27 namespace offline_pages { |
| 29 class OfflinePageInfoBarDelegate; | 28 class OfflinePageInfoBarDelegate; |
| 30 } | 29 } |
| 31 #endif | 30 #endif |
| 32 | 31 |
| 33 namespace translate { | 32 namespace translate { |
| 34 class TranslateInfoBarDelegate; | 33 class TranslateInfoBarDelegate; |
| 35 } | 34 } |
| 36 | 35 |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 virtual PopupBlockedInfoBarDelegate* AsPopupBlockedInfoBarDelegate(); | 221 virtual PopupBlockedInfoBarDelegate* AsPopupBlockedInfoBarDelegate(); |
| 223 virtual RegisterProtocolHandlerInfoBarDelegate* | 222 virtual RegisterProtocolHandlerInfoBarDelegate* |
| 224 AsRegisterProtocolHandlerInfoBarDelegate(); | 223 AsRegisterProtocolHandlerInfoBarDelegate(); |
| 225 virtual ScreenCaptureInfoBarDelegate* AsScreenCaptureInfoBarDelegate(); | 224 virtual ScreenCaptureInfoBarDelegate* AsScreenCaptureInfoBarDelegate(); |
| 226 virtual ThemeInstalledInfoBarDelegate* AsThemePreviewInfobarDelegate(); | 225 virtual ThemeInstalledInfoBarDelegate* AsThemePreviewInfobarDelegate(); |
| 227 virtual ThreeDAPIInfoBarDelegate* AsThreeDAPIInfoBarDelegate(); | 226 virtual ThreeDAPIInfoBarDelegate* AsThreeDAPIInfoBarDelegate(); |
| 228 virtual translate::TranslateInfoBarDelegate* AsTranslateInfoBarDelegate(); | 227 virtual translate::TranslateInfoBarDelegate* AsTranslateInfoBarDelegate(); |
| 229 #if defined(OS_ANDROID) | 228 #if defined(OS_ANDROID) |
| 230 virtual MediaStreamInfoBarDelegateAndroid* | 229 virtual MediaStreamInfoBarDelegateAndroid* |
| 231 AsMediaStreamInfoBarDelegateAndroid(); | 230 AsMediaStreamInfoBarDelegateAndroid(); |
| 232 virtual MediaThrottleInfoBarDelegate* AsMediaThrottleInfoBarDelegate(); | |
| 233 virtual offline_pages::OfflinePageInfoBarDelegate* | 231 virtual offline_pages::OfflinePageInfoBarDelegate* |
| 234 AsOfflinePageInfoBarDelegate(); | 232 AsOfflinePageInfoBarDelegate(); |
| 235 #endif | 233 #endif |
| 236 | 234 |
| 237 void set_infobar(InfoBar* infobar) { infobar_ = infobar; } | 235 void set_infobar(InfoBar* infobar) { infobar_ = infobar; } |
| 238 void set_nav_entry_id(int nav_entry_id) { nav_entry_id_ = nav_entry_id; } | 236 void set_nav_entry_id(int nav_entry_id) { nav_entry_id_ = nav_entry_id; } |
| 239 | 237 |
| 240 protected: | 238 protected: |
| 241 InfoBarDelegate(); | 239 InfoBarDelegate(); |
| 242 | 240 |
| 243 InfoBar* infobar() { return infobar_; } | 241 InfoBar* infobar() { return infobar_; } |
| 244 | 242 |
| 245 private: | 243 private: |
| 246 // The InfoBar associated with us. | 244 // The InfoBar associated with us. |
| 247 InfoBar* infobar_; | 245 InfoBar* infobar_; |
| 248 | 246 |
| 249 // The ID of the active navigation entry at the time we became owned. | 247 // The ID of the active navigation entry at the time we became owned. |
| 250 int nav_entry_id_; | 248 int nav_entry_id_; |
| 251 | 249 |
| 252 DISALLOW_COPY_AND_ASSIGN(InfoBarDelegate); | 250 DISALLOW_COPY_AND_ASSIGN(InfoBarDelegate); |
| 253 }; | 251 }; |
| 254 | 252 |
| 255 } // namespace infobars | 253 } // namespace infobars |
| 256 | 254 |
| 257 #endif // COMPONENTS_INFOBARS_CORE_INFOBAR_DELEGATE_H_ | 255 #endif // COMPONENTS_INFOBARS_CORE_INFOBAR_DELEGATE_H_ |
| OLD | NEW |