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

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: fixed testbots. 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 // Used to access AudioInputDeviceManager. 89 // Used to access AudioInputDeviceManager.
90 AudioInputDeviceManager* audio_input_device_manager(); 90 AudioInputDeviceManager* audio_input_device_manager();
91 91
92 // GenerateStream opens new media devices according to |components|. It 92 // GenerateStream opens new media devices according to |components|. It
93 // creates a new request which is identified by a unique |label| that's 93 // creates a new request which is identified by a unique |label| that's
94 // returned to the caller. 94 // returned to the caller.
95 void GenerateStream(MediaStreamRequester* requester, int render_process_id, 95 void GenerateStream(MediaStreamRequester* requester, int render_process_id,
96 int render_view_id, const StreamOptions& options, 96 int render_view_id, const StreamOptions& options,
97 const GURL& security_origin, std::string* label); 97 const GURL& security_origin, std::string* label);
98 98
99 // Cancels all non-finished GenerateStream request, i.e. request for which
100 // StreamGenerated hasn't been called.
101 void CancelRequests(MediaStreamRequester* requester);
102
103 // Cancel generate stream. 99 // Cancel generate stream.
104 void CancelGenerateStream(const std::string& label); 100 void CancelGenerateStream(const std::string& label);
105 101
106 // Closes generated stream. 102 // Closes generated stream.
107 void StopGeneratedStream(const std::string& label); 103 void StopGeneratedStream(const std::string& label);
108 104
109 // Gets a list of devices of |type|. 105 // Gets a list of devices of |type|.
110 // The request is identified using |label|, which is pointing to a 106 // The request is identified using |label|, which is pointing to a
111 // std::string. 107 // std::string.
112 // The request is persistent, which means the client keeps listening to 108 // The request is persistent, which means the client keeps listening to
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 // Hold a pointer to the IO loop to check we delete the device thread and 228 // Hold a pointer to the IO loop to check we delete the device thread and
233 // managers on the right thread. 229 // managers on the right thread.
234 MessageLoop* io_loop_; 230 MessageLoop* io_loop_;
235 231
236 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager); 232 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager);
237 }; 233 };
238 234
239 } // namespace media_stream 235 } // namespace media_stream
240 236
241 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_ 237 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698