feat: add desktopCapturer.getMediaSourceIdForWebContents() to get stream source id from web contents (#22701)

* feat: add desktopCapturer.getMediaSourceIdForWebContents() to get stream source id from web contents

* Cleanup from #22701 PR comments
This commit is contained in:
Jeremy Judeaux 2020-05-27 04:34:24 +08:00 committed by GitHub
parent dc72f74020
commit 204f001c5d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 178 additions and 2 deletions

View file

@ -13,6 +13,7 @@
#include "chrome/browser/media/webrtc/native_desktop_media_list.h"
#include "gin/handle.h"
#include "gin/wrappable.h"
#include "shell/common/gin_helper/dictionary.h"
namespace electron {
@ -32,6 +33,12 @@ class DesktopCapturer : public gin::Wrappable<DesktopCapturer>,
static gin::Handle<DesktopCapturer> Create(v8::Isolate* isolate);
static std::string GetMediaSourceIdForWebContents(
v8::Isolate* isolate,
gin_helper::ErrorThrower thrower,
int32_t request_web_contents_id,
int32_t web_contents_id);
void StartHandling(bool capture_window,
bool capture_screen,
const gfx::Size& thumbnail_size,