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:
parent
dc72f74020
commit
204f001c5d
9 changed files with 178 additions and 2 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue