Chromium Code Reviews| Index: chrome/browser/media/webrtc/media_stream_infobar_delegate_android.h |
| diff --git a/chrome/browser/media/webrtc/media_stream_infobar_delegate_android.h b/chrome/browser/media/webrtc/media_stream_infobar_delegate_android.h |
| index e401e4757f0f1610907c048c6aa9f7f9c0fff704..fd215c4a55e4bfa38ce8c677feeb0313d21075a2 100644 |
| --- a/chrome/browser/media/webrtc/media_stream_infobar_delegate_android.h |
| +++ b/chrome/browser/media/webrtc/media_stream_infobar_delegate_android.h |
| @@ -10,43 +10,54 @@ |
| #include "base/compiler_specific.h" |
| #include "base/macros.h" |
| #include "chrome/browser/media/webrtc/media_stream_devices_controller.h" |
| -#include "chrome/browser/permissions/grouped_permission_infobar_delegate.h" |
| +#include "chrome/browser/permissions/permission_infobar_delegate.h" |
| // This class configures an infobar shown when a page requests access to a |
| // user's microphone and/or video camera. The user is shown a message asking |
| // which audio and/or video devices he wishes to use with the current page, and |
| // buttons to give access to the selected devices to the page, or to deny access |
| // to them. |
| -class MediaStreamInfoBarDelegateAndroid |
| - : public GroupedPermissionInfoBarDelegate { |
| +class MediaStreamInfoBarDelegateAndroid : public PermissionInfoBarDelegate { |
| public: |
| - ~MediaStreamInfoBarDelegateAndroid() override; |
| - |
| // Prompts the user by creating a media stream infobar and delegate, |
| // then checks for an existing infobar for |web_contents| and replaces it if |
| // found, or just adds the new infobar otherwise. Returns whether an infobar |
| // was created. |
| - static bool Create(content::WebContents* web_contents, |
| + static bool Create(Profile* profile, |
| + content::WebContents* web_contents, |
| std::unique_ptr<MediaStreamDevicesController> controller); |
| private: |
| friend class WebRtcTestBase; |
| - explicit MediaStreamInfoBarDelegateAndroid( |
| + MediaStreamInfoBarDelegateAndroid( |
| + Profile* profile, |
| std::unique_ptr<MediaStreamDevicesController> controller); |
| + ~MediaStreamInfoBarDelegateAndroid() override; |
| - void RecordPermissionAcceptedUma(int position, bool persist); |
| - void RecordPermissionDeniedUma(int position, bool persist); |
| + bool persist() const { return persist_; } |
|
dominickn
2016/09/20 08:01:36
set_persist() is inherited from the parent class s
lshang
2016/09/21 03:47:39
Done.
|
| + void set_persist(bool persist) { persist_ = persist; } |
| + void DoNothing(bool update_content_setting, PermissionAction decision); |
| - // ConfirmInfoBarDelegate: |
| + // PermissionInfoBarDelegate: |
| infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; |
| + Type GetInfoBarType() const override; |
| + int GetIconId() const override; |
| void InfoBarDismissed() override; |
| MediaStreamInfoBarDelegateAndroid* AsMediaStreamInfoBarDelegateAndroid() |
| override; |
| + base::string16 GetMessageText() const override; |
| + base::string16 GetButtonLabel(InfoBarButton button) const override; |
| bool Accept() override; |
| bool Cancel() override; |
| + base::string16 GetLinkText() const override; |
| + GURL GetLinkURL() const override; |
| + int GetMessageResourceId() const override; |
| + bool ShouldShowPersistenceToggle() const override; |
| + std::vector<int> content_setting() const override; |
| std::unique_ptr<MediaStreamDevicesController> controller_; |
| + bool persist_; |
|
dominickn
2016/09/20 08:01:36
This is on the parent PermissionInfoBarDelegate cl
lshang
2016/09/21 03:47:39
persist_ is a private member of parent class so we
|
| DISALLOW_COPY_AND_ASSIGN(MediaStreamInfoBarDelegateAndroid); |
| }; |