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

Side by Side Diff: content/browser/renderer_host/media/media_stream_manager.h

Issue 287383002: Implement getMediaDevices. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 6 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 | Annotate | Revision Log
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 // MediaStreamManager is used to open/enumerate media capture devices (video 5 // MediaStreamManager is used to open/enumerate media capture devices (video
6 // supported now). Call flow: 6 // supported now). Call flow:
7 // 1. GenerateStream is called when a render process wants to use a capture 7 // 1. GenerateStream is called when a render process wants to use a capture
8 // device. 8 // device.
9 // 2. MediaStreamManager will ask MediaStreamUIController for permission to 9 // 2. MediaStreamManager will ask MediaStreamUIController for permission to
10 // use devices and for which device to use. 10 // use devices and for which device to use.
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 int render_view_id, 121 int render_view_id,
122 const std::string& device_id); 122 const std::string& device_id);
123 123
124 // Gets a list of devices of |type|, which must be MEDIA_DEVICE_AUDIO_CAPTURE 124 // Gets a list of devices of |type|, which must be MEDIA_DEVICE_AUDIO_CAPTURE
125 // or MEDIA_DEVICE_VIDEO_CAPTURE. 125 // or MEDIA_DEVICE_VIDEO_CAPTURE.
126 // The request is identified using the string returned to the caller. 126 // The request is identified using the string returned to the caller.
127 // When the |requester| is NULL, MediaStreamManager will enumerate both audio 127 // When the |requester| is NULL, MediaStreamManager will enumerate both audio
128 // and video devices and also start monitoring device changes, such as 128 // and video devices and also start monitoring device changes, such as
129 // plug/unplug. The new device lists will be delivered via media observer to 129 // plug/unplug. The new device lists will be delivered via media observer to
130 // MediaCaptureDevicesDispatcher. 130 // MediaCaptureDevicesDispatcher.
131 // If |have_permission| is false, we remove the device label from the result.
131 virtual std::string EnumerateDevices(MediaStreamRequester* requester, 132 virtual std::string EnumerateDevices(MediaStreamRequester* requester,
132 int render_process_id, 133 int render_process_id,
133 int render_view_id, 134 int render_view_id,
134 const ResourceContext::SaltCallback& sc, 135 const ResourceContext::SaltCallback& sc,
135 int page_request_id, 136 int page_request_id,
136 MediaStreamType type, 137 MediaStreamType type,
137 const GURL& security_origin); 138 const GURL& security_origin,
139 bool have_permission);
138 140
139 // Open a device identified by |device_id|. |type| must be either 141 // Open a device identified by |device_id|. |type| must be either
140 // MEDIA_DEVICE_AUDIO_CAPTURE or MEDIA_DEVICE_VIDEO_CAPTURE. 142 // MEDIA_DEVICE_AUDIO_CAPTURE or MEDIA_DEVICE_VIDEO_CAPTURE.
141 // The request is identified using string returned to the caller. 143 // The request is identified using string returned to the caller.
142 void OpenDevice(MediaStreamRequester* requester, 144 void OpenDevice(MediaStreamRequester* requester,
143 int render_process_id, 145 int render_process_id,
144 int render_view_id, 146 int render_view_id,
145 const ResourceContext::SaltCallback& sc, 147 const ResourceContext::SaltCallback& sc,
146 int page_request_id, 148 int page_request_id,
147 const std::string& device_id, 149 const std::string& device_id,
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 383
382 bool use_fake_ui_; 384 bool use_fake_ui_;
383 scoped_ptr<FakeMediaStreamUIProxy> fake_ui_; 385 scoped_ptr<FakeMediaStreamUIProxy> fake_ui_;
384 386
385 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager); 387 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager);
386 }; 388 };
387 389
388 } // namespace content 390 } // namespace content
389 391
390 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_ 392 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698