| 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 InsecureContentInfoBarDelegate; | 14 class InsecureContentInfoBarDelegate; |
| 15 class MediaStreamInfoBarDelegate; | 15 class MediaStreamInfoBarDelegate; |
| 16 class NativeAppInfoBarDelegate; | 16 class NativeAppInfoBarDelegate; |
| 17 class PermissionInfobarDelegate; |
| 17 class PopupBlockedInfoBarDelegate; | 18 class PopupBlockedInfoBarDelegate; |
| 18 class RegisterProtocolHandlerInfoBarDelegate; | 19 class RegisterProtocolHandlerInfoBarDelegate; |
| 19 class ScreenCaptureInfoBarDelegate; | 20 class ScreenCaptureInfoBarDelegate; |
| 20 class ThemeInstalledInfoBarDelegate; | 21 class ThemeInstalledInfoBarDelegate; |
| 21 class ThreeDAPIInfoBarDelegate; | 22 class ThreeDAPIInfoBarDelegate; |
| 22 | 23 |
| 23 namespace translate { | 24 namespace translate { |
| 24 class TranslateInfoBarDelegate; | 25 class TranslateInfoBarDelegate; |
| 25 } | 26 } |
| 26 | 27 |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 | 111 |
| 111 // Called when the user clicks on the close button to dismiss the infobar. | 112 // Called when the user clicks on the close button to dismiss the infobar. |
| 112 virtual void InfoBarDismissed(); | 113 virtual void InfoBarDismissed(); |
| 113 | 114 |
| 114 // Type-checking downcast routines: | 115 // Type-checking downcast routines: |
| 115 virtual AutoLoginInfoBarDelegate* AsAutoLoginInfoBarDelegate(); | 116 virtual AutoLoginInfoBarDelegate* AsAutoLoginInfoBarDelegate(); |
| 116 virtual ConfirmInfoBarDelegate* AsConfirmInfoBarDelegate(); | 117 virtual ConfirmInfoBarDelegate* AsConfirmInfoBarDelegate(); |
| 117 virtual InsecureContentInfoBarDelegate* AsInsecureContentInfoBarDelegate(); | 118 virtual InsecureContentInfoBarDelegate* AsInsecureContentInfoBarDelegate(); |
| 118 virtual MediaStreamInfoBarDelegate* AsMediaStreamInfoBarDelegate(); | 119 virtual MediaStreamInfoBarDelegate* AsMediaStreamInfoBarDelegate(); |
| 119 virtual NativeAppInfoBarDelegate* AsNativeAppInfoBarDelegate(); | 120 virtual NativeAppInfoBarDelegate* AsNativeAppInfoBarDelegate(); |
| 121 virtual PermissionInfobarDelegate* AsPermissionInfobarDelegate(); |
| 120 virtual PopupBlockedInfoBarDelegate* AsPopupBlockedInfoBarDelegate(); | 122 virtual PopupBlockedInfoBarDelegate* AsPopupBlockedInfoBarDelegate(); |
| 121 virtual RegisterProtocolHandlerInfoBarDelegate* | 123 virtual RegisterProtocolHandlerInfoBarDelegate* |
| 122 AsRegisterProtocolHandlerInfoBarDelegate(); | 124 AsRegisterProtocolHandlerInfoBarDelegate(); |
| 123 virtual ScreenCaptureInfoBarDelegate* AsScreenCaptureInfoBarDelegate(); | 125 virtual ScreenCaptureInfoBarDelegate* AsScreenCaptureInfoBarDelegate(); |
| 124 virtual ThemeInstalledInfoBarDelegate* AsThemePreviewInfobarDelegate(); | 126 virtual ThemeInstalledInfoBarDelegate* AsThemePreviewInfobarDelegate(); |
| 125 virtual ThreeDAPIInfoBarDelegate* AsThreeDAPIInfoBarDelegate(); | 127 virtual ThreeDAPIInfoBarDelegate* AsThreeDAPIInfoBarDelegate(); |
| 126 virtual translate::TranslateInfoBarDelegate* AsTranslateInfoBarDelegate(); | 128 virtual translate::TranslateInfoBarDelegate* AsTranslateInfoBarDelegate(); |
| 127 | 129 |
| 128 void set_infobar(InfoBar* infobar) { infobar_ = infobar; } | 130 void set_infobar(InfoBar* infobar) { infobar_ = infobar; } |
| 129 | 131 |
| 130 protected: | 132 protected: |
| 131 InfoBarDelegate(); | 133 InfoBarDelegate(); |
| 132 | 134 |
| 133 InfoBar* infobar() { return infobar_; } | 135 InfoBar* infobar() { return infobar_; } |
| 134 | 136 |
| 135 private: | 137 private: |
| 136 // The InfoBar associated with us. | 138 // The InfoBar associated with us. |
| 137 InfoBar* infobar_; | 139 InfoBar* infobar_; |
| 138 | 140 |
| 139 DISALLOW_COPY_AND_ASSIGN(InfoBarDelegate); | 141 DISALLOW_COPY_AND_ASSIGN(InfoBarDelegate); |
| 140 }; | 142 }; |
| 141 | 143 |
| 142 } // namespace infobars | 144 } // namespace infobars |
| 143 | 145 |
| 144 #endif // COMPONENTS_INFOBARS_CORE_INFOBAR_DELEGATE_H_ | 146 #endif // COMPONENTS_INFOBARS_CORE_INFOBAR_DELEGATE_H_ |
| OLD | NEW |