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

Unified Diff: content/public/common/media_stream_request.h

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
« no previous file with comments | « content/public/browser/web_contents_delegate.cc ('k') | content/public/common/media_stream_request.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/common/media_stream_request.h
diff --git a/content/public/common/media_stream_request.h b/content/public/common/media_stream_request.h
index c4c838fb6e376a216a3bbc1c979896ff95ee423e..5987e8d55652c53cdaf114eb2179fd7552806dfd 100644
--- a/content/public/common/media_stream_request.h
+++ b/content/public/common/media_stream_request.h
@@ -59,6 +59,21 @@ enum VideoFacingMode {
NUM_MEDIA_VIDEO_FACING_MODE
};
+enum MediaStreamRequestResult {
+ MEDIA_DEVICE_OK = 0,
+ MEDIA_DEVICE_PERMISSION_DENIED,
+ MEDIA_DEVICE_PERMISSION_DISMISSED,
+ MEDIA_DEVICE_INVALID_STATE,
+ MEDIA_DEVICE_NO_HARDWARE,
+ MEDIA_DEVICE_INVALID_SECURITY_ORIGIN,
+ MEDIA_DEVICE_TAB_CAPTURE_FAILURE,
+ MEDIA_DEVICE_SCREEN_CAPTURE_FAILURE,
+ MEDIA_DEVICE_CAPTURE_FAILURE,
+ MEDIA_DEVICE_TRACK_START_FAILURE,
+
+ NUM_MEDIA_REQUEST_RESULTS
+};
+
// Convenience predicates to determine whether the given type represents some
// audio or some video device.
CONTENT_EXPORT bool IsAudioMediaType(MediaStreamType type);
@@ -225,6 +240,7 @@ class MediaStreamUI {
// Callback used return results of media access requests.
typedef base::Callback<void(
const MediaStreamDevices& devices,
+ content::MediaStreamRequestResult result,
scoped_ptr<MediaStreamUI> ui)> MediaResponseCallback;
} // namespace content
« no previous file with comments | « content/public/browser/web_contents_delegate.cc ('k') | content/public/common/media_stream_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698