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

Side by Side Diff: content/public/common/media_stream_request.h

Issue 391703002: Implement ConstraintNotSatisfiedError for getusermedia (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add bug id and reviewer Created 6 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ 5 #ifndef CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_
6 #define CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ 6 #define CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 enum MediaStreamRequestResult { 68 enum MediaStreamRequestResult {
69 MEDIA_DEVICE_OK = 0, 69 MEDIA_DEVICE_OK = 0,
70 MEDIA_DEVICE_PERMISSION_DENIED, 70 MEDIA_DEVICE_PERMISSION_DENIED,
71 MEDIA_DEVICE_PERMISSION_DISMISSED, 71 MEDIA_DEVICE_PERMISSION_DISMISSED,
72 MEDIA_DEVICE_INVALID_STATE, 72 MEDIA_DEVICE_INVALID_STATE,
73 MEDIA_DEVICE_NO_HARDWARE, 73 MEDIA_DEVICE_NO_HARDWARE,
74 MEDIA_DEVICE_INVALID_SECURITY_ORIGIN, 74 MEDIA_DEVICE_INVALID_SECURITY_ORIGIN,
75 MEDIA_DEVICE_TAB_CAPTURE_FAILURE, 75 MEDIA_DEVICE_TAB_CAPTURE_FAILURE,
76 MEDIA_DEVICE_SCREEN_CAPTURE_FAILURE, 76 MEDIA_DEVICE_SCREEN_CAPTURE_FAILURE,
77 MEDIA_DEVICE_CAPTURE_FAILURE, 77 MEDIA_DEVICE_CAPTURE_FAILURE,
78 MEDIA_DEVICE_CONSTRAINT_NOT_SATISFIED,
no longer working on chromium 2014/07/25 19:27:35 curiously, could you please explain why MEDIA_DEVI
jiajia.qin 2014/07/28 05:10:20 I think it's the same meaning. The final error nam
no longer working on chromium 2014/07/28 19:55:07 OK, then keep using MEDIA_DEVICE_CONSTRAINT_NOT_SA
78 MEDIA_DEVICE_TRACK_START_FAILURE, 79 MEDIA_DEVICE_TRACK_START_FAILURE,
80 MEDIA_DEVICE_SOURCE_START_FAILURE,
79 81
80 NUM_MEDIA_REQUEST_RESULTS 82 NUM_MEDIA_REQUEST_RESULTS
81 }; 83 };
82 84
83 // Convenience predicates to determine whether the given type represents some 85 // Convenience predicates to determine whether the given type represents some
84 // audio or some video device. 86 // audio or some video device.
85 CONTENT_EXPORT bool IsAudioInputMediaType(MediaStreamType type); 87 CONTENT_EXPORT bool IsAudioInputMediaType(MediaStreamType type);
86 CONTENT_EXPORT bool IsVideoMediaType(MediaStreamType type); 88 CONTENT_EXPORT bool IsVideoMediaType(MediaStreamType type);
87 89
88 // TODO(xians): Change the structs to classes. 90 // TODO(xians): Change the structs to classes.
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 261
260 // Callback used return results of media access requests. 262 // Callback used return results of media access requests.
261 typedef base::Callback<void( 263 typedef base::Callback<void(
262 const MediaStreamDevices& devices, 264 const MediaStreamDevices& devices,
263 content::MediaStreamRequestResult result, 265 content::MediaStreamRequestResult result,
264 scoped_ptr<MediaStreamUI> ui)> MediaResponseCallback; 266 scoped_ptr<MediaStreamUI> ui)> MediaResponseCallback;
265 267
266 } // namespace content 268 } // namespace content
267 269
268 #endif // CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ 270 #endif // CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698