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 HungRendererInfoBarDelegate; |
14 class InsecureContentInfoBarDelegate; | 14 class InsecureContentInfoBarDelegate; |
15 class MediaStreamInfoBarDelegate; | 15 class MediaStreamInfoBarDelegate; |
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) |
| 25 class MediaThrottleInfoBarDelegate; |
| 26 #endif |
| 27 |
24 namespace translate { | 28 namespace translate { |
25 class TranslateInfoBarDelegate; | 29 class TranslateInfoBarDelegate; |
26 } | 30 } |
27 | 31 |
28 namespace gfx { | 32 namespace gfx { |
29 class Image; | 33 class Image; |
30 enum class VectorIconId; | 34 enum class VectorIconId; |
31 } | 35 } |
32 | 36 |
33 namespace infobars { | 37 namespace infobars { |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 virtual MediaStreamInfoBarDelegate* AsMediaStreamInfoBarDelegate(); | 127 virtual MediaStreamInfoBarDelegate* AsMediaStreamInfoBarDelegate(); |
124 virtual NativeAppInfoBarDelegate* AsNativeAppInfoBarDelegate(); | 128 virtual NativeAppInfoBarDelegate* AsNativeAppInfoBarDelegate(); |
125 virtual PermissionInfobarDelegate* AsPermissionInfobarDelegate(); | 129 virtual PermissionInfobarDelegate* AsPermissionInfobarDelegate(); |
126 virtual PopupBlockedInfoBarDelegate* AsPopupBlockedInfoBarDelegate(); | 130 virtual PopupBlockedInfoBarDelegate* AsPopupBlockedInfoBarDelegate(); |
127 virtual RegisterProtocolHandlerInfoBarDelegate* | 131 virtual RegisterProtocolHandlerInfoBarDelegate* |
128 AsRegisterProtocolHandlerInfoBarDelegate(); | 132 AsRegisterProtocolHandlerInfoBarDelegate(); |
129 virtual ScreenCaptureInfoBarDelegate* AsScreenCaptureInfoBarDelegate(); | 133 virtual ScreenCaptureInfoBarDelegate* AsScreenCaptureInfoBarDelegate(); |
130 virtual ThemeInstalledInfoBarDelegate* AsThemePreviewInfobarDelegate(); | 134 virtual ThemeInstalledInfoBarDelegate* AsThemePreviewInfobarDelegate(); |
131 virtual ThreeDAPIInfoBarDelegate* AsThreeDAPIInfoBarDelegate(); | 135 virtual ThreeDAPIInfoBarDelegate* AsThreeDAPIInfoBarDelegate(); |
132 virtual translate::TranslateInfoBarDelegate* AsTranslateInfoBarDelegate(); | 136 virtual translate::TranslateInfoBarDelegate* AsTranslateInfoBarDelegate(); |
| 137 #if defined(OS_ANDROID) |
| 138 virtual MediaThrottleInfoBarDelegate* AsMediaThrottleInfoBarDelegate(); |
| 139 #endif |
133 | 140 |
134 void set_infobar(InfoBar* infobar) { infobar_ = infobar; } | 141 void set_infobar(InfoBar* infobar) { infobar_ = infobar; } |
135 void set_nav_entry_id(int nav_entry_id) { nav_entry_id_ = nav_entry_id; } | 142 void set_nav_entry_id(int nav_entry_id) { nav_entry_id_ = nav_entry_id; } |
136 | 143 |
137 protected: | 144 protected: |
138 InfoBarDelegate(); | 145 InfoBarDelegate(); |
139 | 146 |
140 InfoBar* infobar() { return infobar_; } | 147 InfoBar* infobar() { return infobar_; } |
141 | 148 |
142 private: | 149 private: |
143 // The InfoBar associated with us. | 150 // The InfoBar associated with us. |
144 InfoBar* infobar_; | 151 InfoBar* infobar_; |
145 | 152 |
146 // The ID of the active navigation entry at the time we became owned. | 153 // The ID of the active navigation entry at the time we became owned. |
147 int nav_entry_id_; | 154 int nav_entry_id_; |
148 | 155 |
149 DISALLOW_COPY_AND_ASSIGN(InfoBarDelegate); | 156 DISALLOW_COPY_AND_ASSIGN(InfoBarDelegate); |
150 }; | 157 }; |
151 | 158 |
152 } // namespace infobars | 159 } // namespace infobars |
153 | 160 |
154 #endif // COMPONENTS_INFOBARS_CORE_INFOBAR_DELEGATE_H_ | 161 #endif // COMPONENTS_INFOBARS_CORE_INFOBAR_DELEGATE_H_ |
OLD | NEW |