Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1776)

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 180633008: Add different error codes for getUserMedia. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed comments Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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(
« no previous file with comments | « content/browser/renderer_host/media/video_capture_host_unittest.cc ('k') | content/common/media/media_stream_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698