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 ConfirmInfoBarDelegate; | 12 class ConfirmInfoBarDelegate; |
| 13 class HungRendererInfoBarDelegate; |
13 class InsecureContentInfoBarDelegate; | 14 class InsecureContentInfoBarDelegate; |
14 class MediaStreamInfoBarDelegate; | 15 class MediaStreamInfoBarDelegate; |
15 class NativeAppInfoBarDelegate; | 16 class NativeAppInfoBarDelegate; |
16 class PermissionInfobarDelegate; | 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 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 // page (not including reloads). Subclasses wishing to change this behavior | 105 // page (not including reloads). Subclasses wishing to change this behavior |
105 // can override either this function or ShouldExpireInternal(), depending on | 106 // can override either this function or ShouldExpireInternal(), depending on |
106 // what level of control they need. | 107 // what level of control they need. |
107 virtual bool ShouldExpire(const NavigationDetails& details) const; | 108 virtual bool ShouldExpire(const NavigationDetails& details) const; |
108 | 109 |
109 // Called when the user clicks on the close button to dismiss the infobar. | 110 // Called when the user clicks on the close button to dismiss the infobar. |
110 virtual void InfoBarDismissed(); | 111 virtual void InfoBarDismissed(); |
111 | 112 |
112 // Type-checking downcast routines: | 113 // Type-checking downcast routines: |
113 virtual ConfirmInfoBarDelegate* AsConfirmInfoBarDelegate(); | 114 virtual ConfirmInfoBarDelegate* AsConfirmInfoBarDelegate(); |
| 115 virtual HungRendererInfoBarDelegate* AsHungRendererInfoBarDelegate(); |
114 virtual InsecureContentInfoBarDelegate* AsInsecureContentInfoBarDelegate(); | 116 virtual InsecureContentInfoBarDelegate* AsInsecureContentInfoBarDelegate(); |
115 virtual MediaStreamInfoBarDelegate* AsMediaStreamInfoBarDelegate(); | 117 virtual MediaStreamInfoBarDelegate* AsMediaStreamInfoBarDelegate(); |
116 virtual NativeAppInfoBarDelegate* AsNativeAppInfoBarDelegate(); | 118 virtual NativeAppInfoBarDelegate* AsNativeAppInfoBarDelegate(); |
117 virtual PermissionInfobarDelegate* AsPermissionInfobarDelegate(); | 119 virtual PermissionInfobarDelegate* AsPermissionInfobarDelegate(); |
118 virtual PopupBlockedInfoBarDelegate* AsPopupBlockedInfoBarDelegate(); | 120 virtual PopupBlockedInfoBarDelegate* AsPopupBlockedInfoBarDelegate(); |
119 virtual RegisterProtocolHandlerInfoBarDelegate* | 121 virtual RegisterProtocolHandlerInfoBarDelegate* |
120 AsRegisterProtocolHandlerInfoBarDelegate(); | 122 AsRegisterProtocolHandlerInfoBarDelegate(); |
121 virtual ScreenCaptureInfoBarDelegate* AsScreenCaptureInfoBarDelegate(); | 123 virtual ScreenCaptureInfoBarDelegate* AsScreenCaptureInfoBarDelegate(); |
122 virtual ThemeInstalledInfoBarDelegate* AsThemePreviewInfobarDelegate(); | 124 virtual ThemeInstalledInfoBarDelegate* AsThemePreviewInfobarDelegate(); |
123 virtual ThreeDAPIInfoBarDelegate* AsThreeDAPIInfoBarDelegate(); | 125 virtual ThreeDAPIInfoBarDelegate* AsThreeDAPIInfoBarDelegate(); |
(...skipping 13 matching lines...) Expand all Loading... |
137 | 139 |
138 // The ID of the active navigation entry at the time we became owned. | 140 // The ID of the active navigation entry at the time we became owned. |
139 int nav_entry_id_; | 141 int nav_entry_id_; |
140 | 142 |
141 DISALLOW_COPY_AND_ASSIGN(InfoBarDelegate); | 143 DISALLOW_COPY_AND_ASSIGN(InfoBarDelegate); |
142 }; | 144 }; |
143 | 145 |
144 } // namespace infobars | 146 } // namespace infobars |
145 | 147 |
146 #endif // COMPONENTS_INFOBARS_CORE_INFOBAR_DELEGATE_H_ | 148 #endif // COMPONENTS_INFOBARS_CORE_INFOBAR_DELEGATE_H_ |
OLD | NEW |