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

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

Issue 1952463002: Media Stream Image Capture (4): wire takePhoto and implement in FakeVCDevice (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tommi@ and mlamouri@ comments Created 4 years, 7 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 // 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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 170
171 // Finds and returns the device id corresponding to the given 171 // Finds and returns the device id corresponding to the given
172 // |source_id|. Returns true if there was a raw device id that matched the 172 // |source_id|. Returns true if there was a raw device id that matched the
173 // given |source_id|, false if nothing matched it. 173 // given |source_id|, false if nothing matched it.
174 bool TranslateSourceIdToDeviceId(MediaStreamType stream_type, 174 bool TranslateSourceIdToDeviceId(MediaStreamType stream_type,
175 const ResourceContext::SaltCallback& rc, 175 const ResourceContext::SaltCallback& rc,
176 const url::Origin& security_origin, 176 const url::Origin& security_origin,
177 const std::string& source_id, 177 const std::string& source_id,
178 std::string* device_id) const; 178 std::string* device_id) const;
179 179
180 // Find |device_id| in the list of |requests_|, and returns its session id,
181 // or StreamDeviceInfo::kNoId if not found.
182 int VideoDeviceIdToSessionId(const std::string& device_id) const;
183
180 // Called by UI to make sure the device monitor is started so that UI receive 184 // Called by UI to make sure the device monitor is started so that UI receive
181 // notifications about device changes. 185 // notifications about device changes.
182 void EnsureDeviceMonitorStarted(); 186 void EnsureDeviceMonitorStarted();
183 187
184 // Implements MediaStreamProviderListener. 188 // Implements MediaStreamProviderListener.
185 void Opened(MediaStreamType stream_type, int capture_session_id) override; 189 void Opened(MediaStreamType stream_type, int capture_session_id) override;
186 void Closed(MediaStreamType stream_type, int capture_session_id) override; 190 void Closed(MediaStreamType stream_type, int capture_session_id) override;
187 void DevicesEnumerated(MediaStreamType stream_type, 191 void DevicesEnumerated(MediaStreamType stream_type,
188 const StreamDeviceInfoArray& devices) override; 192 const StreamDeviceInfoArray& devices) override;
189 void Aborted(MediaStreamType stream_type, int capture_session_id) override; 193 void Aborted(MediaStreamType stream_type, int capture_session_id) override;
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 462
459 // Objects subscribed to changes in the set of media devices. 463 // Objects subscribed to changes in the set of media devices.
460 std::vector<MediaStreamRequester*> device_change_subscribers_; 464 std::vector<MediaStreamRequester*> device_change_subscribers_;
461 465
462 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager); 466 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager);
463 }; 467 };
464 468
465 } // namespace content 469 } // namespace content
466 470
467 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_ 471 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_
OLDNEW
« no previous file with comments | « content/browser/media/capture/image_capture_impl.cc ('k') | content/browser/renderer_host/media/media_stream_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698