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

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

Issue 701103002: Remove pure-virtual MediaStreamProvider::Unregister method and make overrides non-virtual. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « content/browser/renderer_host/media/media_stream_provider.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // VideoCaptureManager is used to open/close, start/stop, enumerate available 5 // VideoCaptureManager is used to open/close, start/stop, enumerate available
6 // video capture devices, and manage VideoCaptureController's. 6 // video capture devices, and manage VideoCaptureController's.
7 // All functions are expected to be called from Browser::IO thread. Some helper 7 // All functions are expected to be called from Browser::IO thread. Some helper
8 // functions (*OnDeviceThread) will dispatch operations to the device thread. 8 // functions (*OnDeviceThread) will dispatch operations to the device thread.
9 // VideoCaptureManager will open OS dependent instances of VideoCaptureDevice. 9 // VideoCaptureManager will open OS dependent instances of VideoCaptureDevice.
10 // A device can only be opened once. 10 // A device can only be opened once.
(...skipping 26 matching lines...) Expand all
37 // VideoCaptureManager opens/closes and start/stops video capture devices. 37 // VideoCaptureManager opens/closes and start/stops video capture devices.
38 class CONTENT_EXPORT VideoCaptureManager : public MediaStreamProvider { 38 class CONTENT_EXPORT VideoCaptureManager : public MediaStreamProvider {
39 public: 39 public:
40 // Callback used to signal the completion of a controller lookup. 40 // Callback used to signal the completion of a controller lookup.
41 typedef base::Callback< 41 typedef base::Callback<
42 void(const base::WeakPtr<VideoCaptureController>&)> DoneCB; 42 void(const base::WeakPtr<VideoCaptureController>&)> DoneCB;
43 43
44 explicit VideoCaptureManager( 44 explicit VideoCaptureManager(
45 scoped_ptr<media::VideoCaptureDeviceFactory> factory); 45 scoped_ptr<media::VideoCaptureDeviceFactory> factory);
46 46
47 void Unregister();
48
47 // Implements MediaStreamProvider. 49 // Implements MediaStreamProvider.
48 void Register(MediaStreamProviderListener* listener, 50 void Register(MediaStreamProviderListener* listener,
49 const scoped_refptr<base::SingleThreadTaskRunner>& 51 const scoped_refptr<base::SingleThreadTaskRunner>&
50 device_task_runner) override; 52 device_task_runner) override;
51 53
52 void Unregister() override;
53
54 void EnumerateDevices(MediaStreamType stream_type) override; 54 void EnumerateDevices(MediaStreamType stream_type) override;
55 55
56 int Open(const StreamDeviceInfo& device) override; 56 int Open(const StreamDeviceInfo& device) override;
57 57
58 void Close(int capture_session_id) override; 58 void Close(int capture_session_id) override;
59 59
60 // Called by VideoCaptureHost to locate a capture device for |capture_params|, 60 // Called by VideoCaptureHost to locate a capture device for |capture_params|,
61 // adding the Host as a client of the device's controller if successful. The 61 // adding the Host as a client of the device's controller if successful. The
62 // value of |session_id| controls which device is selected; 62 // value of |session_id| controls which device is selected;
63 // this value should be a session id previously returned by Open(). 63 // this value should be a session id previously returned by Open().
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 // Accessed on the device thread only. 256 // Accessed on the device thread only.
257 std::map<media::VideoCaptureSessionId, gfx::NativeViewId> 257 std::map<media::VideoCaptureSessionId, gfx::NativeViewId>
258 notification_window_ids_; 258 notification_window_ids_;
259 259
260 DISALLOW_COPY_AND_ASSIGN(VideoCaptureManager); 260 DISALLOW_COPY_AND_ASSIGN(VideoCaptureManager);
261 }; 261 };
262 262
263 } // namespace content 263 } // namespace content
264 264
265 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_MANAGER_H_ 265 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_MANAGER_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/media/media_stream_provider.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698