| Index: trunk/src/chrome/browser/media/media_stream_infobar_delegate.cc
|
| ===================================================================
|
| --- trunk/src/chrome/browser/media/media_stream_infobar_delegate.cc (revision 238401)
|
| +++ trunk/src/chrome/browser/media/media_stream_infobar_delegate.cc (working copy)
|
| @@ -8,7 +8,6 @@
|
| #include "base/metrics/histogram.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| #include "chrome/browser/google/google_util.h"
|
| -#include "chrome/browser/infobars/infobar.h"
|
| #include "chrome/browser/infobars/infobar_service.h"
|
| #include "chrome/common/url_constants.h"
|
| #include "content/public/browser/web_contents.h"
|
| @@ -51,12 +50,12 @@
|
| return false;
|
| }
|
|
|
| - scoped_ptr<InfoBar> infobar(ConfirmInfoBarDelegate::CreateInfoBar(
|
| - scoped_ptr<ConfirmInfoBarDelegate>(
|
| - new MediaStreamInfoBarDelegate(controller.Pass()))));
|
| + scoped_ptr<InfoBarDelegate> infobar(
|
| + new MediaStreamInfoBarDelegate(infobar_service, controller.Pass()));
|
| for (size_t i = 0; i < infobar_service->infobar_count(); ++i) {
|
| - InfoBar* old_infobar = infobar_service->infobar_at(i);
|
| - if (old_infobar->delegate()->AsMediaStreamInfoBarDelegate()) {
|
| + InfoBarDelegate* old_infobar =
|
| + infobar_service->infobar_at(i)->AsMediaStreamInfoBarDelegate();
|
| + if (old_infobar) {
|
| infobar_service->ReplaceInfoBar(old_infobar, infobar.Pass());
|
| return true;
|
| }
|
| @@ -66,8 +65,9 @@
|
| }
|
|
|
| MediaStreamInfoBarDelegate::MediaStreamInfoBarDelegate(
|
| + InfoBarService* infobar_service,
|
| scoped_ptr<MediaStreamDevicesController> controller)
|
| - : ConfirmInfoBarDelegate(),
|
| + : ConfirmInfoBarDelegate(infobar_service),
|
| controller_(controller.Pass()) {
|
| DCHECK(controller_.get());
|
| DCHECK(controller_->HasAudio() || controller_->HasVideo());
|
|
|