Skip to content

Commit

Permalink
chore: Update comment for desktop_capturer (#19848)
Browse files Browse the repository at this point in the history
* chore: Update comment for desktop_capturer

* Guard TopLevelWindow::MoveAbove with ENABLE_DESKTOP_CAPTURER

* Fix lint errors
  • Loading branch information
John Kleinschmidt authored and codebytere committed Aug 21, 2019
1 parent 4bc7b3b commit 46b6bcd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions BUILD.gn
Expand Up @@ -583,6 +583,9 @@ source_set("electron_lib") {

if (enable_desktop_capturer) {
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" ]
}
sources += [
Expand Down
4 changes: 4 additions & 0 deletions shell/browser/api/atom_api_top_level_window.cc
Expand Up @@ -555,8 +555,12 @@ std::vector<int> TopLevelWindow::GetPosition() {
}
void TopLevelWindow::MoveAbove(const std::string& sourceId,
mate::Arguments* args) {
#if BUILDFLAG(ENABLE_DESKTOP_CAPTURER)
if (!window_->MoveAbove(sourceId))
args->ThrowError("Invalid media source id");
#else
args->ThrowError("enable_desktop_capturer=true to use this feature");
#endif
}

void TopLevelWindow::MoveTop() {
Expand Down

0 comments on commit 46b6bcd

Please sign in to comment.