In this change, bool DesktopCapturer::IsOccluded(const DesktopVector& pos); is added to DesktopCapturer interface. This function returns true if the |pos| is hidden by other elements on the display. The function expects to return false for ScreenCapturer implementations: everything is visible on the screen. In WindowCapturer implementations, WindowFinder is expected to be used to help detect the WindowId under |pos|. If the window_id_ equals to the window id returned by WindowFinder, this function returns false. To ensure the correct coordinate is used, a comment is also added to WindowFinder::GetWindowUnderPoint() function. Considering it's used only in desktop_capture module, using system coordinate is simpler. Bug: webrtc:7950 Change-Id: I8ac4fbd5f4a612388f1593907805cfb2c359f70f Reviewed-on: https://chromium-review.googlesource.com/636784 Reviewed-by: Jamie Walch <jamiewalch@chromium.org> Commit-Queue: Zijie He <zijiehe@chromium.org> Cr-Commit-Position: refs/heads/master@{#19590}
31 lines
966 B
C++
31 lines
966 B
C++
/*
|
|
* Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license
|
|
* that can be found in the LICENSE file in the root of the source
|
|
* tree. An additional intellectual property rights grant can be found
|
|
* in the file PATENTS. All contributing project authors may
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
*/
|
|
|
|
#ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_WINDOW_FINDER_MAC_H_
|
|
#define WEBRTC_MODULES_DESKTOP_CAPTURE_WINDOW_FINDER_MAC_H_
|
|
|
|
#include "webrtc/modules/desktop_capture/window_finder.h"
|
|
|
|
namespace webrtc {
|
|
|
|
// The implementation of WindowFinder for Mac OSX.
|
|
class WindowFinderMac final : public WindowFinder {
|
|
public:
|
|
WindowFinderMac();
|
|
~WindowFinderMac() override;
|
|
|
|
// WindowFinder implementation.
|
|
WindowId GetWindowUnderPoint(DesktopVector point) override;
|
|
};
|
|
|
|
} // namespace webrtc
|
|
|
|
#endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WINDOW_FINDER_MAC_H_
|