| Index: chrome/browser/media/media_stream_capture_indicator.cc
|
| diff --git a/chrome/browser/media/media_stream_capture_indicator.cc b/chrome/browser/media/media_stream_capture_indicator.cc
|
| index 4bedce6a01adead9e48646dd5a32c836a22a7ac0..96f2b8778bad6893fddd17f78d34f5b792579e41 100644
|
| --- a/chrome/browser/media/media_stream_capture_indicator.cc
|
| +++ b/chrome/browser/media/media_stream_capture_indicator.cc
|
| @@ -6,6 +6,7 @@
|
|
|
| #include "base/bind.h"
|
| #include "base/i18n/rtl.h"
|
| +#include "base/logging.h"
|
| #include "base/utf_string_conversions.h"
|
| #include "chrome/app/chrome_command_ids.h"
|
| #include "chrome/browser/browser_process.h"
|
| @@ -402,14 +403,14 @@ void MediaStreamCaptureIndicator::AddCaptureDeviceTab(
|
| bool video = false;
|
| content::MediaStreamDevices::const_iterator dev = devices.begin();
|
| for (; dev != devices.end(); ++dev) {
|
| - DCHECK(dev->type == content::MEDIA_STREAM_DEVICE_TYPE_AUDIO_CAPTURE ||
|
| - dev->type == content::MEDIA_STREAM_DEVICE_TYPE_VIDEO_CAPTURE);
|
| - if (dev->type == content::MEDIA_STREAM_DEVICE_TYPE_AUDIO_CAPTURE) {
|
| + if (content::IsAudioMediaStreamDeviceType(dev->type)) {
|
| ++iter->audio_ref_count;
|
| audio = true;
|
| - } else {
|
| + } else if (content::IsVideoMediaStreamDeviceType(dev->type)) {
|
| ++iter->video_ref_count;
|
| video = true;
|
| + } else {
|
| + NOTIMPLEMENTED();
|
| }
|
| }
|
|
|
| @@ -429,12 +430,13 @@ void MediaStreamCaptureIndicator::RemoveCaptureDeviceTab(
|
| if (iter != tabs_.end()) {
|
| content::MediaStreamDevices::const_iterator dev = devices.begin();
|
| for (; dev != devices.end(); ++dev) {
|
| - DCHECK(dev->type == content::MEDIA_STREAM_DEVICE_TYPE_AUDIO_CAPTURE ||
|
| - dev->type == content::MEDIA_STREAM_DEVICE_TYPE_VIDEO_CAPTURE);
|
| - if (dev->type == content::MEDIA_STREAM_DEVICE_TYPE_AUDIO_CAPTURE)
|
| + if (content::IsAudioMediaStreamDeviceType(dev->type)) {
|
| --iter->audio_ref_count;
|
| - else
|
| + } else if (content::IsVideoMediaStreamDeviceType(dev->type)) {
|
| --iter->video_ref_count;
|
| + } else {
|
| + NOTIMPLEMENTED();
|
| + }
|
|
|
| DCHECK_GE(iter->audio_ref_count, 0);
|
| DCHECK_GE(iter->video_ref_count, 0);
|
|
|