Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Unified Diff: webrtc/modules/desktop_capture/fake_desktop_capturer.h

Issue 2471773002: Revert of Add CreateWindowCapturer() and CreateScreenCapturer() in DesktopCapturer (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/desktop_capture/fake_desktop_capturer.h
diff --git a/webrtc/modules/desktop_capture/fake_desktop_capturer.h b/webrtc/modules/desktop_capture/fake_desktop_capturer.h
index 30187775408653bf9e5fd480a150ca3d319f59cc..fa5ccba7eb15c2e9b46dcd3c78ceb1ac7c684e9a 100644
--- a/webrtc/modules/desktop_capture/fake_desktop_capturer.h
+++ b/webrtc/modules/desktop_capture/fake_desktop_capturer.h
@@ -15,7 +15,6 @@
#include <utility>
#include "webrtc/modules/desktop_capture/desktop_capturer.h"
-#include "webrtc/modules/desktop_capture/desktop_capture_types.h"
#include "webrtc/modules/desktop_capture/desktop_frame_generator.h"
#include "webrtc/modules/desktop_capture/shared_desktop_frame.h"
#include "webrtc/modules/desktop_capture/shared_memory.h"
@@ -38,7 +37,7 @@
//
// TODO(zijiehe): Remove template T once we merge ScreenCapturer and
// WindowCapturer.
-template <typename T = DesktopCapturer>
+template <typename T>
class FakeDesktopCapturer : public T {
public:
FakeDesktopCapturer()
@@ -84,20 +83,7 @@
shared_memory_factory_ = std::move(shared_memory_factory);
}
- bool GetSourceList(DesktopCapturer::SourceList* sources) override {
- sources->push_back({kWindowId, "A-Fake-DesktopCapturer-Window"});
- sources->push_back({kScreenId});
- return true;
- }
-
- bool SelectSource(DesktopCapturer::SourceId id) override {
- return id == kWindowId || id == kScreenId || id == kFullDesktopScreenId;
- }
-
private:
- static constexpr DesktopCapturer::SourceId kWindowId = 1378277495;
- static constexpr DesktopCapturer::SourceId kScreenId = 1378277496;
-
DesktopCapturer::Callback* callback_;
std::unique_ptr<SharedMemoryFactory> shared_memory_factory_;
DesktopCapturer::Result result_;

Powered by Google App Engine
This is Rietveld 408576698