Adds display_id field to DesktopCapturer.

The display_id field will be used in
https://chromium-review.googlesource.com/c/chromium/src/+/4020313.

Bug: chromium:1358949
Change-Id: I57b445e0a0fca540a2f3a5941238aee2cd995005
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/282960
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Tony Herre <herre@google.com>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Simon Hangl <simonha@google.com>
Cr-Commit-Position: refs/heads/main@{#38617}
diff --git a/modules/desktop_capture/desktop_capture_types.h b/modules/desktop_capture/desktop_capture_types.h
index fd5f881..9627076 100644
--- a/modules/desktop_capture/desktop_capture_types.h
+++ b/modules/desktop_capture/desktop_capture_types.h
@@ -25,6 +25,8 @@
 
 const WindowId kNullWindowId = 0;
 
+const int64_t kInvalidDisplayId = -1;
+
 // Type used to identify screens on the desktop. Values are platform-specific:
 //   - On Windows: integer display device index.
 //   - On OSX: CGDirectDisplayID cast to intptr_t.
@@ -33,9 +35,9 @@
 // On Windows, ScreenId is implementation dependent: sending a ScreenId from one
 // implementation to another usually won't work correctly.
 #if defined(CHROMEOS)
-  typedef int64_t ScreenId;
+typedef int64_t ScreenId;
 #else
-  typedef intptr_t ScreenId;
+typedef intptr_t ScreenId;
 #endif
 
 // The screen id corresponds to all screen combined together.
diff --git a/modules/desktop_capture/desktop_capturer.h b/modules/desktop_capture/desktop_capturer.h
index 513bf50..3e8f0dc 100644
--- a/modules/desktop_capture/desktop_capturer.h
+++ b/modules/desktop_capture/desktop_capturer.h
@@ -86,6 +86,10 @@
     // TODO(https://crbug.com/1369162): Remove or refactor this value.
     WindowId in_process_id = kNullWindowId;
 #endif
+
+    // The display's unique ID. If no ID is defined, it will hold the value
+    // kInvalidDisplayId.
+    int64_t display_id = kInvalidDisplayId;
   };
 
   typedef std::vector<Source> SourceList;