| Index: chrome/browser/media/webrtc_browsertest_base.cc
|
| ===================================================================
|
| --- chrome/browser/media/webrtc_browsertest_base.cc (revision 226624)
|
| +++ chrome/browser/media/webrtc_browsertest_base.cc (working copy)
|
| @@ -35,9 +35,8 @@
|
| void WebRtcTestBase::GetUserMediaWithSpecificConstraintsAndAccept(
|
| content::WebContents* tab_contents,
|
| const std::string& constraints) {
|
| - MediaStreamInfoBarDelegate* infobar =
|
| - GetUserMediaAndWaitForInfoBar(tab_contents, constraints);
|
| - infobar->Accept();
|
| + InfoBar* infobar = GetUserMediaAndWaitForInfoBar(tab_contents, constraints);
|
| + infobar->delegate()->AsConfirmInfoBarDelegate()->Accept();
|
| CloseInfoBarInTab(tab_contents, infobar);
|
|
|
| // Wait for WebRTC to call the success callback.
|
| @@ -54,9 +53,8 @@
|
| void WebRtcTestBase::GetUserMediaWithSpecificConstraintsAndDeny(
|
| content::WebContents* tab_contents,
|
| const std::string& constraints) {
|
| - MediaStreamInfoBarDelegate* infobar =
|
| - GetUserMediaAndWaitForInfoBar(tab_contents, constraints);
|
| - infobar->Cancel();
|
| + InfoBar* infobar = GetUserMediaAndWaitForInfoBar(tab_contents, constraints);
|
| + infobar->delegate()->AsConfirmInfoBarDelegate()->Cancel();
|
| CloseInfoBarInTab(tab_contents, infobar);
|
|
|
| // Wait for WebRTC to call the fail callback.
|
| @@ -66,9 +64,9 @@
|
|
|
| void WebRtcTestBase::GetUserMediaAndDismiss(
|
| content::WebContents* tab_contents) {
|
| - MediaStreamInfoBarDelegate* infobar =
|
| + InfoBar* infobar =
|
| GetUserMediaAndWaitForInfoBar(tab_contents, kAudioVideoCallConstraints);
|
| - infobar->InfoBarDismissed();
|
| + infobar->delegate()->InfoBarDismissed();
|
| CloseInfoBarInTab(tab_contents, infobar);
|
|
|
| // A dismiss should be treated like a deny.
|
| @@ -85,7 +83,7 @@
|
| EXPECT_EQ("ok-requested", result);
|
| }
|
|
|
| -MediaStreamInfoBarDelegate* WebRtcTestBase::GetUserMediaAndWaitForInfoBar(
|
| +InfoBar* WebRtcTestBase::GetUserMediaAndWaitForInfoBar(
|
| content::WebContents* tab_contents,
|
| const std::string& constraints) {
|
| content::WindowedNotificationObserver infobar_added(
|
| @@ -97,14 +95,13 @@
|
|
|
| // Wait for the bar to pop up, then return it.
|
| infobar_added.Wait();
|
| - content::Details<InfoBarAddedDetails> details(infobar_added.details());
|
| - MediaStreamInfoBarDelegate* infobar = details->AsMediaStreamInfoBarDelegate();
|
| - EXPECT_TRUE(infobar);
|
| - return infobar;
|
| + content::Details<InfoBar::AddedDetails> details(infobar_added.details());
|
| + EXPECT_TRUE(details->delegate()->AsMediaStreamInfoBarDelegate());
|
| + return details.ptr();
|
| }
|
|
|
| void WebRtcTestBase::CloseInfoBarInTab(content::WebContents* tab_contents,
|
| - MediaStreamInfoBarDelegate* infobar) {
|
| + InfoBar* infobar) {
|
| content::WindowedNotificationObserver infobar_removed(
|
| chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED,
|
| content::NotificationService::AllSources());
|
|
|