diff --git a/modules/desktop_capture/desktop_capture_types.h b/modules/desktop_capture/desktop_capture_types.h index 4dcfc82708..bc26db7cc4 100644 --- a/modules/desktop_capture/desktop_capture_types.h +++ b/modules/desktop_capture/desktop_capture_types.h @@ -27,9 +27,14 @@ const WindowId kNullWindowId = 0; // - On Windows: integer display device index. // - On OSX: CGDirectDisplayID cast to intptr_t. // - On Linux (with X11): TBD. +// - On ChromeOS: display::Display::id() is an int64_t. // On Windows, ScreenId is implementation dependent: sending a ScreenId from one // implementation to another usually won't work correctly. -typedef intptr_t ScreenId; +#if defined(CHROMEOS) + typedef int64_t ScreenId; +#else + typedef intptr_t ScreenId; +#endif // The screen id corresponds to all screen combined together. const ScreenId kFullDesktopScreenId = -1; diff --git a/modules/desktop_capture/desktop_capturer.h b/modules/desktop_capture/desktop_capturer.h index 8a65e5759c..822a75d947 100644 --- a/modules/desktop_capture/desktop_capturer.h +++ b/modules/desktop_capture/desktop_capturer.h @@ -59,7 +59,11 @@ class RTC_EXPORT DesktopCapturer { virtual ~Callback() {} }; +#if defined(CHROMEOS) + typedef int64_t SourceId; +#else typedef intptr_t SourceId; +#endif static_assert(std::is_same::value, "SourceId should be a same type as ScreenId.");