Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(861)

Side by Side Diff: components/infobars/core/infobar_delegate.h

Issue 2315563002: Add PermissionPromptAndroid skeleton (Closed)
Patch Set: address review comments Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 GroupedPermissionInfoBarDelegate;
25 class MediaStreamInfoBarDelegateAndroid; 26 class MediaStreamInfoBarDelegateAndroid;
26 class MediaThrottleInfoBarDelegate; 27 class MediaThrottleInfoBarDelegate;
27 28
28 namespace offline_pages { 29 namespace offline_pages {
29 class OfflinePageInfoBarDelegate; 30 class OfflinePageInfoBarDelegate;
30 } 31 }
31 #endif 32 #endif
32 33
33 namespace translate { 34 namespace translate {
34 class TranslateInfoBarDelegate; 35 class TranslateInfoBarDelegate;
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 virtual NativeAppInfoBarDelegate* AsNativeAppInfoBarDelegate(); 218 virtual NativeAppInfoBarDelegate* AsNativeAppInfoBarDelegate();
218 virtual PermissionInfoBarDelegate* AsPermissionInfoBarDelegate(); 219 virtual PermissionInfoBarDelegate* AsPermissionInfoBarDelegate();
219 virtual PopupBlockedInfoBarDelegate* AsPopupBlockedInfoBarDelegate(); 220 virtual PopupBlockedInfoBarDelegate* AsPopupBlockedInfoBarDelegate();
220 virtual RegisterProtocolHandlerInfoBarDelegate* 221 virtual RegisterProtocolHandlerInfoBarDelegate*
221 AsRegisterProtocolHandlerInfoBarDelegate(); 222 AsRegisterProtocolHandlerInfoBarDelegate();
222 virtual ScreenCaptureInfoBarDelegate* AsScreenCaptureInfoBarDelegate(); 223 virtual ScreenCaptureInfoBarDelegate* AsScreenCaptureInfoBarDelegate();
223 virtual ThemeInstalledInfoBarDelegate* AsThemePreviewInfobarDelegate(); 224 virtual ThemeInstalledInfoBarDelegate* AsThemePreviewInfobarDelegate();
224 virtual ThreeDAPIInfoBarDelegate* AsThreeDAPIInfoBarDelegate(); 225 virtual ThreeDAPIInfoBarDelegate* AsThreeDAPIInfoBarDelegate();
225 virtual translate::TranslateInfoBarDelegate* AsTranslateInfoBarDelegate(); 226 virtual translate::TranslateInfoBarDelegate* AsTranslateInfoBarDelegate();
226 #if defined(OS_ANDROID) 227 #if defined(OS_ANDROID)
228 virtual GroupedPermissionInfoBarDelegate*
229 AsGroupedPermissionInfoBarDelegate();
227 virtual MediaStreamInfoBarDelegateAndroid* 230 virtual MediaStreamInfoBarDelegateAndroid*
228 AsMediaStreamInfoBarDelegateAndroid(); 231 AsMediaStreamInfoBarDelegateAndroid();
229 virtual MediaThrottleInfoBarDelegate* AsMediaThrottleInfoBarDelegate(); 232 virtual MediaThrottleInfoBarDelegate* AsMediaThrottleInfoBarDelegate();
230 virtual offline_pages::OfflinePageInfoBarDelegate* 233 virtual offline_pages::OfflinePageInfoBarDelegate*
231 AsOfflinePageInfoBarDelegate(); 234 AsOfflinePageInfoBarDelegate();
232 #endif 235 #endif
233 236
234 void set_infobar(InfoBar* infobar) { infobar_ = infobar; } 237 void set_infobar(InfoBar* infobar) { infobar_ = infobar; }
235 void set_nav_entry_id(int nav_entry_id) { nav_entry_id_ = nav_entry_id; } 238 void set_nav_entry_id(int nav_entry_id) { nav_entry_id_ = nav_entry_id; }
236 239
237 protected: 240 protected:
238 InfoBarDelegate(); 241 InfoBarDelegate();
239 242
240 InfoBar* infobar() { return infobar_; } 243 InfoBar* infobar() { return infobar_; }
241 244
242 private: 245 private:
243 // The InfoBar associated with us. 246 // The InfoBar associated with us.
244 InfoBar* infobar_; 247 InfoBar* infobar_;
245 248
246 // The ID of the active navigation entry at the time we became owned. 249 // The ID of the active navigation entry at the time we became owned.
247 int nav_entry_id_; 250 int nav_entry_id_;
248 251
249 DISALLOW_COPY_AND_ASSIGN(InfoBarDelegate); 252 DISALLOW_COPY_AND_ASSIGN(InfoBarDelegate);
250 }; 253 };
251 254
252 } // namespace infobars 255 } // namespace infobars
253 256
254 #endif // COMPONENTS_INFOBARS_CORE_INFOBAR_DELEGATE_H_ 257 #endif // COMPONENTS_INFOBARS_CORE_INFOBAR_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698