Index: content/browser/web_contents/web_contents_impl.cc |
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc |
index a03bef4424195bb9f0d76a772c74a4e35324160c..c3b8fe7f52572ae72ff70091f09d10e7f505203b 100644 |
--- a/content/browser/web_contents/web_contents_impl.cc |
+++ b/content/browser/web_contents/web_contents_impl.cc |
@@ -1585,10 +1585,13 @@ RenderWidgetHostView* WebContentsImpl::GetCreatedWidget(int route_id) { |
void WebContentsImpl::RequestMediaAccessPermission( |
const MediaStreamRequest& request, |
const MediaResponseCallback& callback) { |
- if (delegate_) |
+ if (delegate_) { |
delegate_->RequestMediaAccessPermission(this, request, callback); |
- else |
- callback.Run(MediaStreamDevices(), scoped_ptr<MediaStreamUI>()); |
+ } else { |
+ callback.Run(MediaStreamDevices(), |
+ MEDIA_DEVICE_INVALID_STATE, |
+ scoped_ptr<MediaStreamUI>()); |
+ } |
} |
SessionStorageNamespace* WebContentsImpl::GetSessionStorageNamespace( |