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

Side by Side Diff: content/renderer/media/media_stream_dispatcher.h

Issue 2696443002: Reland of Use spec-compliant algorithm to select video devices in getUserMedia. (Closed)
Patch Set: Address boliu's comments Created 3 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 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_RENDERER_MEDIA_MEDIA_STREAM_DISPATCHER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DISPATCHER_H_
6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DISPATCHER_H_ 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DISPATCHER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <memory> 10 #include <memory>
(...skipping 27 matching lines...) Expand all
38 explicit MediaStreamDispatcher(RenderFrame* render_frame); 38 explicit MediaStreamDispatcher(RenderFrame* render_frame);
39 ~MediaStreamDispatcher() override; 39 ~MediaStreamDispatcher() override;
40 40
41 // Request a new media stream to be created. 41 // Request a new media stream to be created.
42 // This can be used either by WebKit or a plugin. 42 // This can be used either by WebKit or a plugin.
43 // Note: The event_handler must be valid for as long as the stream exists. 43 // Note: The event_handler must be valid for as long as the stream exists.
44 virtual void GenerateStream( 44 virtual void GenerateStream(
45 int request_id, 45 int request_id,
46 const base::WeakPtr<MediaStreamDispatcherEventHandler>& event_handler, 46 const base::WeakPtr<MediaStreamDispatcherEventHandler>& event_handler,
47 const StreamControls& controls, 47 const StreamControls& controls,
48 const url::Origin& security_origin); 48 const url::Origin& security_origin,
49 bool is_processing_user_gesture);
49 50
50 // Cancel the request for a new media stream to be created. 51 // Cancel the request for a new media stream to be created.
51 virtual void CancelGenerateStream( 52 virtual void CancelGenerateStream(
52 int request_id, 53 int request_id,
53 const base::WeakPtr<MediaStreamDispatcherEventHandler>& event_handler); 54 const base::WeakPtr<MediaStreamDispatcherEventHandler>& event_handler);
54 55
55 // Stop a started device that has been requested by calling GenerateStream. 56 // Stop a started device that has been requested by calling GenerateStream.
56 virtual void StopStreamDevice(const StreamDeviceInfo& device_info); 57 virtual void StopStreamDevice(const StreamDeviceInfo& device_info);
57 58
58 // Request to open a device. 59 // Request to open a device.
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 // been canceled. 127 // been canceled.
127 typedef std::list<Request> RequestList; 128 typedef std::list<Request> RequestList;
128 RequestList requests_; 129 RequestList requests_;
129 130
130 DISALLOW_COPY_AND_ASSIGN(MediaStreamDispatcher); 131 DISALLOW_COPY_AND_ASSIGN(MediaStreamDispatcher);
131 }; 132 };
132 133
133 } // namespace content 134 } // namespace content
134 135
135 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DISPATCHER_H_ 136 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_DISPATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698