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

Unified Diff: content/browser/media/capture/web_contents_video_capture_device.h

Issue 1825633002: Adds UMA histograms for desktop tab and audio capture through (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/media/capture/web_contents_video_capture_device.h
diff --git a/content/browser/media/capture/web_contents_video_capture_device.h b/content/browser/media/capture/web_contents_video_capture_device.h
index ab0e03ad7d4d5ffa89c4cdb7d6ab35f30f49cbd4..d8576b55b1caa23744c0273b7bbbae3e00991b09 100644
--- a/content/browser/media/capture/web_contents_video_capture_device.h
+++ b/content/browser/media/capture/web_contents_video_capture_device.h
@@ -28,9 +28,16 @@ namespace content {
class CONTENT_EXPORT WebContentsVideoCaptureDevice
: public media::VideoCaptureDevice {
public:
+ enum JavaScriptType {
miu 2016/03/24 20:51:03 This is an abstraction violation. There's no reas
GeorgeZ 2016/03/25 16:35:04 Thanks for pointing this out. I was asked to mimi
+ CHROME_TAB_CAPTURE,
+ CHROME_CHOOSE_DESKTOP_MEDIA,
+ NONE_TYPE
+ };
+
// Create a WebContentsVideoCaptureDevice instance from the given
// |device_id|. Returns NULL if |device_id| is invalid.
- static media::VideoCaptureDevice* Create(const std::string& device_id);
+ static media::VideoCaptureDevice* Create(const std::string& device_id,
+ JavaScriptType type);
~WebContentsVideoCaptureDevice() override;
@@ -40,10 +47,10 @@ class CONTENT_EXPORT WebContentsVideoCaptureDevice
void StopAndDeAllocate() override;
private:
- WebContentsVideoCaptureDevice(
- int render_process_id,
- int main_render_frame_id,
- bool enable_auto_throttling);
+ WebContentsVideoCaptureDevice(int render_process_id,
+ int main_render_frame_id,
+ bool enable_auto_throttling,
+ JavaScriptType type);
const scoped_ptr<media::ScreenCaptureDeviceCore> core_;

Powered by Google App Engine
This is Rietveld 408576698