From c23b0b26df0ed7d482729dbdc47137ed7a7db788 Mon Sep 17 00:00:00 2001 From: nisse Date: Tue, 24 Jan 2017 00:03:32 -0800 Subject: [PATCH] Delete unused classes DesktopId and ScreencastEventCatcher. BUG=webrtc:6424 Review-Url: https://codereview.webrtc.org/2650703002 Cr-Commit-Position: refs/heads/master@{#16228} --- webrtc/base/window.h | 48 ----------------------------------- webrtc/media/base/testutils.h | 14 ---------- 2 files changed, 62 deletions(-) diff --git a/webrtc/base/window.h b/webrtc/base/window.h index e5b5d50882..a4a9aa4465 100644 --- a/webrtc/base/window.h +++ b/webrtc/base/window.h @@ -69,54 +69,6 @@ class WindowId { WindowT id_; }; -class DesktopId { - public: - // Define DesktopT for each platform. -#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) - typedef Window DesktopT; -#elif defined(WEBRTC_WIN) - typedef HMONITOR DesktopT; -#elif defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) - typedef CGDirectDisplayID DesktopT; -#else - typedef unsigned int DesktopT; -#endif - - static DesktopId Cast(int id, int index) { -#if defined(WEBRTC_WIN) - return DesktopId(reinterpret_cast(id), index); -#else - return DesktopId(static_cast(id), index); -#endif - } - - DesktopId() : id_(0), index_(-1) {} - DesktopId(const DesktopT& id, int index) // NOLINT - : id_(id), index_(index) { - } - const DesktopT& id() const { return id_; } - int index() const { return index_; } - bool IsValid() const { return index_ != -1; } - bool Equals(const DesktopId& other) const { - return id_ == other.id() && index_ == other.index(); - } - - private: - // Id is the platform specific desktop identifier. - DesktopT id_; - // Index is the desktop index as enumerated by each platform. - // Desktop capturer typically takes the index instead of id. - int index_; -}; - -// Window event types. -enum WindowEvent { - WE_RESIZE = 0, - WE_CLOSE = 1, - WE_MINIMIZE = 2, - WE_RESTORE = 3, -}; - inline std::string ToString(const WindowId& window) { return ToString(window.id()); } diff --git a/webrtc/media/base/testutils.h b/webrtc/media/base/testutils.h index b0aacd5746..5c3d1a71fd 100644 --- a/webrtc/media/base/testutils.h +++ b/webrtc/media/base/testutils.h @@ -105,20 +105,6 @@ class VideoCapturerListener bool resolution_changed_; }; -class ScreencastEventCatcher : public sigslot::has_slots<> { - public: - ScreencastEventCatcher() : ssrc_(0), ev_(rtc::WE_RESIZE) { } - uint32_t ssrc() const { return ssrc_; } - rtc::WindowEvent event() const { return ev_; } - void OnEvent(uint32_t ssrc, rtc::WindowEvent ev) { - ssrc_ = ssrc; - ev_ = ev; - } - private: - uint32_t ssrc_; - rtc::WindowEvent ev_; -}; - class VideoMediaErrorCatcher : public sigslot::has_slots<> { public: VideoMediaErrorCatcher() : ssrc_(0), error_(VideoMediaChannel::ERROR_NONE) { }