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

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

Issue 10534004: Implement CancelUserMediaRequest for the browser part (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: addressed tommi's comments Created 8 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
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 MediaStreamDeviceSettings for permission to 9 // 2. MediaStreamManager will ask MediaStreamDeviceSettings for permission to
10 // use devices and for which device to use. 10 // use devices and for which device to use.
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 // request is identified using |label|, which is pointing to an already 78 // request is identified using |label|, which is pointing to an already
79 // created std::string. 79 // created std::string.
80 void GenerateStream(MediaStreamRequester* requester, int render_process_id, 80 void GenerateStream(MediaStreamRequester* requester, int render_process_id,
81 int render_view_id, const StreamOptions& options, 81 int render_view_id, const StreamOptions& options,
82 const GURL& security_origin, std::string* label); 82 const GURL& security_origin, std::string* label);
83 83
84 // Cancels all non-finished GenerateStream request, i.e. request for which 84 // Cancels all non-finished GenerateStream request, i.e. request for which
85 // StreamGenerated hasn't been called. 85 // StreamGenerated hasn't been called.
86 void CancelRequests(MediaStreamRequester* requester); 86 void CancelRequests(MediaStreamRequester* requester);
87 87
88 // Cancel generate stream.
89 void CancelGenerateStream(const std::string& label);
90
88 // Closes generated stream. 91 // Closes generated stream.
89 void StopGeneratedStream(const std::string& label); 92 void StopGeneratedStream(const std::string& label);
90 93
91 // Gets a list of devices of |type|. 94 // Gets a list of devices of |type|.
92 // The request is identified using |label|, which is pointing to a 95 // The request is identified using |label|, which is pointing to a
93 // std::string. 96 // std::string.
94 void EnumerateDevices(MediaStreamRequester* requester, 97 void EnumerateDevices(MediaStreamRequester* requester,
95 int render_process_id, 98 int render_process_id,
96 int render_view_id, 99 int render_view_id,
97 MediaStreamType type, 100 MediaStreamType type,
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 typedef std::map<std::string, DeviceRequest> DeviceRequests; 161 typedef std::map<std::string, DeviceRequest> DeviceRequests;
159 DeviceRequests requests_; 162 DeviceRequests requests_;
160 media::AudioManager* audio_manager_; 163 media::AudioManager* audio_manager_;
161 164
162 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager); 165 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager);
163 }; 166 };
164 167
165 } // namespace media_stream 168 } // namespace media_stream
166 169
167 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_ 170 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698