chore: Update comment for desktop_capturer (#19848)
* chore: Update comment for desktop_capturer * Guard TopLevelWindow::MoveAbove with ENABLE_DESKTOP_CAPTURER * Fix lint errors
This commit is contained in:
parent
4bc7b3b1a4
commit
46b6bcd99b
2 changed files with 7 additions and 0 deletions
3
BUILD.gn
3
BUILD.gn
|
@ -583,6 +583,9 @@ source_set("electron_lib") {
|
||||||
|
|
||||||
if (enable_desktop_capturer) {
|
if (enable_desktop_capturer) {
|
||||||
if (is_component_build && !is_linux) {
|
if (is_component_build && !is_linux) {
|
||||||
|
# On windows the implementation relies on unexported
|
||||||
|
# DxgiDuplicatorController class. On macOS the implementation
|
||||||
|
# relies on unexported webrtc::GetWindowOwnerPid method.
|
||||||
deps += [ "//third_party/webrtc/modules/desktop_capture" ]
|
deps += [ "//third_party/webrtc/modules/desktop_capture" ]
|
||||||
}
|
}
|
||||||
sources += [
|
sources += [
|
||||||
|
|
|
@ -555,8 +555,12 @@ std::vector<int> TopLevelWindow::GetPosition() {
|
||||||
}
|
}
|
||||||
void TopLevelWindow::MoveAbove(const std::string& sourceId,
|
void TopLevelWindow::MoveAbove(const std::string& sourceId,
|
||||||
mate::Arguments* args) {
|
mate::Arguments* args) {
|
||||||
|
#if BUILDFLAG(ENABLE_DESKTOP_CAPTURER)
|
||||||
if (!window_->MoveAbove(sourceId))
|
if (!window_->MoveAbove(sourceId))
|
||||||
args->ThrowError("Invalid media source id");
|
args->ThrowError("Invalid media source id");
|
||||||
|
#else
|
||||||
|
args->ThrowError("enable_desktop_capturer=true to use this feature");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void TopLevelWindow::MoveTop() {
|
void TopLevelWindow::MoveTop() {
|
||||||
|
|
Loading…
Reference in a new issue