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

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

Issue 584383002: Stricter default RequestMediaAccessPermission and CheckMediaAccessPermission implementations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix. Created 6 years, 2 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 MEDIA_DEVICE_PERMISSION_DENIED = 1, 72 MEDIA_DEVICE_PERMISSION_DENIED = 1,
73 MEDIA_DEVICE_PERMISSION_DISMISSED = 2, 73 MEDIA_DEVICE_PERMISSION_DISMISSED = 2,
74 MEDIA_DEVICE_INVALID_STATE = 3, 74 MEDIA_DEVICE_INVALID_STATE = 3,
75 MEDIA_DEVICE_NO_HARDWARE = 4, 75 MEDIA_DEVICE_NO_HARDWARE = 4,
76 MEDIA_DEVICE_INVALID_SECURITY_ORIGIN = 5, 76 MEDIA_DEVICE_INVALID_SECURITY_ORIGIN = 5,
77 MEDIA_DEVICE_TAB_CAPTURE_FAILURE = 6, 77 MEDIA_DEVICE_TAB_CAPTURE_FAILURE = 6,
78 MEDIA_DEVICE_SCREEN_CAPTURE_FAILURE = 7, 78 MEDIA_DEVICE_SCREEN_CAPTURE_FAILURE = 7,
79 MEDIA_DEVICE_CAPTURE_FAILURE = 8, 79 MEDIA_DEVICE_CAPTURE_FAILURE = 8,
80 MEDIA_DEVICE_CONSTRAINT_NOT_SATISFIED = 9, 80 MEDIA_DEVICE_CONSTRAINT_NOT_SATISFIED = 9,
81 MEDIA_DEVICE_TRACK_START_FAILURE = 10, 81 MEDIA_DEVICE_TRACK_START_FAILURE = 10,
82 82 MEDIA_DEVICE_NOT_SUPPORTED = 11,
83 NUM_MEDIA_REQUEST_RESULTS 83 NUM_MEDIA_REQUEST_RESULTS
84 }; 84 };
85 85
86 // Convenience predicates to determine whether the given type represents some 86 // Convenience predicates to determine whether the given type represents some
87 // audio or some video device. 87 // audio or some video device.
88 CONTENT_EXPORT bool IsAudioInputMediaType(MediaStreamType type); 88 CONTENT_EXPORT bool IsAudioInputMediaType(MediaStreamType type);
89 CONTENT_EXPORT bool IsVideoMediaType(MediaStreamType type); 89 CONTENT_EXPORT bool IsVideoMediaType(MediaStreamType type);
90 90
91 // TODO(xians): Change the structs to classes. 91 // TODO(xians): Change the structs to classes.
92 // Represents one device in a request for media stream(s). 92 // Represents one device in a request for media stream(s).
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 262
263 // Callback used return results of media access requests. 263 // Callback used return results of media access requests.
264 typedef base::Callback<void( 264 typedef base::Callback<void(
265 const MediaStreamDevices& devices, 265 const MediaStreamDevices& devices,
266 content::MediaStreamRequestResult result, 266 content::MediaStreamRequestResult result,
267 scoped_ptr<MediaStreamUI> ui)> MediaResponseCallback; 267 scoped_ptr<MediaStreamUI> ui)> MediaResponseCallback;
268 268
269 } // namespace content 269 } // namespace content
270 270
271 #endif // CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ 271 #endif // CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_
OLDNEW
« no previous file with comments | « content/public/browser/web_contents_delegate.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698