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

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

Issue 10829190: Resolve the problems where we can leak the system tray UI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added dispatcher_host_unittests and addressed Perk's and Magnus' comments. Created 8 years, 4 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 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 // Used to access AudioInputDeviceManager. 87 // Used to access AudioInputDeviceManager.
88 AudioInputDeviceManager* audio_input_device_manager(); 88 AudioInputDeviceManager* audio_input_device_manager();
89 89
90 // GenerateStream opens new media devices according to |components|. It 90 // GenerateStream opens new media devices according to |components|. It
91 // creates a new request which is identified by a unique |label| that's 91 // creates a new request which is identified by a unique |label| that's
92 // returned to the caller. 92 // returned to the caller.
93 void GenerateStream(MediaStreamRequester* requester, int render_process_id, 93 void GenerateStream(MediaStreamRequester* requester, int render_process_id,
94 int render_view_id, const StreamOptions& options, 94 int render_view_id, const StreamOptions& options,
95 const GURL& security_origin, std::string* label); 95 const GURL& security_origin, std::string* label);
96 96
97 // Cancels all non-finished GenerateStream request, i.e. request for which
98 // StreamGenerated hasn't been called.
99 void CancelRequests(MediaStreamRequester* requester);
100
101 // Cancel generate stream. 97 // Cancel generate stream.
102 void CancelGenerateStream(const std::string& label); 98 void CancelGenerateStream(const std::string& label);
103 99
104 // Closes generated stream. 100 // Closes generated stream.
105 void StopGeneratedStream(const std::string& label); 101 void StopGeneratedStream(const std::string& label);
106 102
107 // Gets a list of devices of |type|. 103 // Gets a list of devices of |type|.
108 // The request is identified using |label|, which is pointing to a 104 // The request is identified using |label|, which is pointing to a
109 // std::string. 105 // std::string.
110 void EnumerateDevices(MediaStreamRequester* requester, 106 void EnumerateDevices(MediaStreamRequester* requester,
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 // Hold a pointer to the IO loop to check we delete the device thread and 187 // Hold a pointer to the IO loop to check we delete the device thread and
192 // managers on the right thread. 188 // managers on the right thread.
193 MessageLoop* io_loop_; 189 MessageLoop* io_loop_;
194 190
195 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager); 191 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager);
196 }; 192 };
197 193
198 } // namespace media_stream 194 } // namespace media_stream
199 195
200 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_ 196 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698