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

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

Issue 57913002: Refactor how the DeviceMonitor is started. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 // The request is identified using string returned to the caller. 131 // The request is identified using string returned to the caller.
132 std::string OpenDevice(MediaStreamRequester* requester, 132 std::string OpenDevice(MediaStreamRequester* requester,
133 int render_process_id, 133 int render_process_id,
134 int render_view_id, 134 int render_view_id,
135 ResourceContext* rc, 135 ResourceContext* rc,
136 int page_request_id, 136 int page_request_id,
137 const std::string& device_id, 137 const std::string& device_id,
138 MediaStreamType type, 138 MediaStreamType type,
139 const GURL& security_origin); 139 const GURL& security_origin);
140 140
141 // Called by UI to make sure the device monitor is started so that UI receive
142 // notifications about device changes.
143 void EnsureDeviceMonitorStarted();
144
141 // Implements MediaStreamProviderListener. 145 // Implements MediaStreamProviderListener.
142 virtual void Opened(MediaStreamType stream_type, 146 virtual void Opened(MediaStreamType stream_type,
143 int capture_session_id) OVERRIDE; 147 int capture_session_id) OVERRIDE;
144 virtual void Closed(MediaStreamType stream_type, 148 virtual void Closed(MediaStreamType stream_type,
145 int capture_session_id) OVERRIDE; 149 int capture_session_id) OVERRIDE;
146 virtual void DevicesEnumerated(MediaStreamType stream_type, 150 virtual void DevicesEnumerated(MediaStreamType stream_type,
147 const StreamDeviceInfoArray& devices) OVERRIDE; 151 const StreamDeviceInfoArray& devices) OVERRIDE;
148 152
149 // Implements base::SystemMonitor::DevicesChangedObserver. 153 // Implements base::SystemMonitor::DevicesChangedObserver.
150 virtual void OnDevicesChanged( 154 virtual void OnDevicesChanged(
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 321
318 bool use_fake_ui_; 322 bool use_fake_ui_;
319 scoped_ptr<FakeMediaStreamUIProxy> fake_ui_; 323 scoped_ptr<FakeMediaStreamUIProxy> fake_ui_;
320 324
321 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager); 325 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager);
322 }; 326 };
323 327
324 } // namespace content 328 } // namespace content
325 329
326 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_ 330 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_
OLDNEW
« no previous file with comments | « content/browser/media/media_devices_monitor.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