From 7e231f0a071edb7181990ada5a115defc4477278 Mon Sep 17 00:00:00 2001 From: tedchoc Date: Tue, 9 Jun 2015 19:42:15 -0700 Subject: Add initial support for runtime permissions in android M. After clicking the "Allow" button in the infobars, Chrome will request the permission if required from Android. BUG=496447 Review URL: https://codereview.chromium.org/1164973003 Cr-Commit-Position: refs/heads/master@{#333663} --- components/infobars/core/infobar_delegate.cc | 4 ++++ components/infobars/core/infobar_delegate.h | 2 ++ 2 files changed, 6 insertions(+) (limited to 'components/infobars') diff --git a/components/infobars/core/infobar_delegate.cc b/components/infobars/core/infobar_delegate.cc index 37fbdf7..d9f7655 100644 --- a/components/infobars/core/infobar_delegate.cc +++ b/components/infobars/core/infobar_delegate.cc @@ -68,6 +68,10 @@ NativeAppInfoBarDelegate* InfoBarDelegate::AsNativeAppInfoBarDelegate() { return nullptr; } +PermissionInfobarDelegate* InfoBarDelegate::AsPermissionInfobarDelegate() { + return nullptr; +} + PopupBlockedInfoBarDelegate* InfoBarDelegate::AsPopupBlockedInfoBarDelegate() { return nullptr; } diff --git a/components/infobars/core/infobar_delegate.h b/components/infobars/core/infobar_delegate.h index ec6cd82..4c1e234 100644 --- a/components/infobars/core/infobar_delegate.h +++ b/components/infobars/core/infobar_delegate.h @@ -14,6 +14,7 @@ class ConfirmInfoBarDelegate; class InsecureContentInfoBarDelegate; class MediaStreamInfoBarDelegate; class NativeAppInfoBarDelegate; +class PermissionInfobarDelegate; class PopupBlockedInfoBarDelegate; class RegisterProtocolHandlerInfoBarDelegate; class ScreenCaptureInfoBarDelegate; @@ -114,6 +115,7 @@ class InfoBarDelegate { virtual InsecureContentInfoBarDelegate* AsInsecureContentInfoBarDelegate(); virtual MediaStreamInfoBarDelegate* AsMediaStreamInfoBarDelegate(); virtual NativeAppInfoBarDelegate* AsNativeAppInfoBarDelegate(); + virtual PermissionInfobarDelegate* AsPermissionInfobarDelegate(); virtual PopupBlockedInfoBarDelegate* AsPopupBlockedInfoBarDelegate(); virtual RegisterProtocolHandlerInfoBarDelegate* AsRegisterProtocolHandlerInfoBarDelegate(); -- cgit v1.1