feat: Implement BrowserWindow.getMediaSourceId() and BrowserWindow.moveAbove(mediaSourceId) (#18926)
* feat: Implement BrowserWindow.moveAbove(mediaSourceId) BrowserWindow.{focus,blur,moveTop}() are not enough in some situations. For example when implementing an overlay that follows another window that can lose focus. In that case it is useful to move the overlay above the tracked window. sourceId is a string in the format of DesktopCapturerSource.id, for example "window:1869:0". Notes: Added BrowserWindow.moveAbove(mediaSourceId) https://github.com/electron/electron/issues/18922 * feat: Implement BrowserWindow.getMediaSourceId Return the Window id in the format of DesktopCapturerSource's id. For example "window🔢0". https://github.com/electron/electron/issues/16460 Notes: Added BrowserWindow.getMediaSourceId
This commit is contained in:
parent
d0c7a91a50
commit
680399f476
12 changed files with 320 additions and 4 deletions
|
@ -68,6 +68,7 @@ class NativeWindowViews : public NativeWindow,
|
|||
void SetContentSizeConstraints(
|
||||
const extensions::SizeConstraints& size_constraints) override;
|
||||
void SetResizable(bool resizable) override;
|
||||
bool MoveAbove(const std::string& sourceId) override;
|
||||
void MoveTop() override;
|
||||
bool IsResizable() override;
|
||||
void SetMovable(bool movable) override;
|
||||
|
@ -124,6 +125,7 @@ class NativeWindowViews : public NativeWindow,
|
|||
|
||||
bool IsVisibleOnAllWorkspaces() override;
|
||||
|
||||
content::DesktopMediaID GetDesktopMediaID() const override;
|
||||
gfx::AcceleratedWidget GetAcceleratedWidget() const override;
|
||||
NativeWindowHandle GetNativeWindowHandle() const override;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue