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

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, 10 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/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..917f4ee8e5edfc45feedee9cd77d6d6c683aa11d 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 {
+ OK = 0,
Tom Sepez 2014/03/06 18:36:26 nit: are you sure we want to pollute the content
Tommy Widenflycht 2014/03/07 11:50:05 Not really... Fixed by prefixing with MEDIA_DEVICE
+ PERMISSION_DENIED,
+ PERMISSION_DISMISSED,
+ INVALID_STATE,
+ NO_HARDWARE,
+ INVALID_SECURITY_ORIGIN,
+ TAB_CAPTURE_FAILURE,
+ SCREEN_CAPTURE_FAILURE,
+ DEVICE_CAPTURE_FAILURE,
+ 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

Powered by Google App Engine
This is Rietveld 408576698