Commit 02977655 authored by xhwang's avatar xhwang Committed by Commit bot

media: Minor fixes in ProtectedMediaIdentifier*.

TBR=kkimlabs@chromium.org,ddorwin@chromium.org
BUG=446263

Review URL: https://codereview.chromium.org/890813002

Cr-Commit-Position: refs/heads/master@{#313882}
parent b17ead43
...@@ -34,24 +34,23 @@ class ProtectedMediaIdentifierInfoBarDelegate : public ConfirmInfoBarDelegate { ...@@ -34,24 +34,23 @@ class ProtectedMediaIdentifierInfoBarDelegate : public ConfirmInfoBarDelegate {
const GURL& requesting_frame, const GURL& requesting_frame,
int contents_unique_id, int contents_unique_id,
const std::string& display_languages); const std::string& display_languages);
virtual ~ProtectedMediaIdentifierInfoBarDelegate(); ~ProtectedMediaIdentifierInfoBarDelegate() override;
// Calls back to the controller to inform it of the user's decision. // Calls back to the controller to inform it of the user's decision.
void SetPermission(bool update_content_setting, bool allowed); void SetPermission(bool update_content_setting, bool allowed);
private: private:
// ConfirmInfoBarDelegate: // ConfirmInfoBarDelegate:
virtual void InfoBarDismissed() override; void InfoBarDismissed() override;
virtual int GetIconID() const override; int GetIconID() const override;
virtual Type GetInfoBarType() const override; Type GetInfoBarType() const override;
virtual bool ShouldExpireInternal( bool ShouldExpireInternal(const NavigationDetails& details) const override;
const NavigationDetails& details) const override; base::string16 GetMessageText() const override;
virtual base::string16 GetMessageText() const override; base::string16 GetButtonLabel(InfoBarButton button) const override;
virtual base::string16 GetButtonLabel(InfoBarButton button) const override; bool Accept() override;
virtual bool Accept() override; bool Cancel() override;
virtual bool Cancel() override; base::string16 GetLinkText() const override;
virtual base::string16 GetLinkText() const override; bool LinkClicked(WindowOpenDisposition disposition) override;
virtual bool LinkClicked(WindowOpenDisposition disposition) override;
PermissionQueueController* controller_; PermissionQueueController* controller_;
const PermissionRequestID id_; const PermissionRequestID id_;
......
...@@ -48,8 +48,7 @@ void ProtectedMediaIdentifierPermissionContext::RequestPermission( ...@@ -48,8 +48,7 @@ void ProtectedMediaIdentifierPermissionContext::RequestPermission(
<< "Attempt to use protected media identifier in tabless renderer: " << "Attempt to use protected media identifier in tabless renderer: "
<< id.ToString() << id.ToString()
<< " (can't prompt user without a visible tab)"; << " (can't prompt user without a visible tab)";
NotifyPermissionSet(id, NotifyPermissionSet(id, requesting_frame_origin,
origin,
web_contents->GetLastCommittedURL().GetOrigin(), web_contents->GetLastCommittedURL().GetOrigin(),
callback, false, false); callback, false, false);
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment