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

Unified Diff: ui/views/widget/desktop_aura/desktop_screen_x11.cc

Issue 2361283002: Add GetDisplayWithDisplayId to display::Screen. (Closed)
Patch Set: test Created 4 years, 3 months 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: ui/views/widget/desktop_aura/desktop_screen_x11.cc
diff --git a/ui/views/widget/desktop_aura/desktop_screen_x11.cc b/ui/views/widget/desktop_aura/desktop_screen_x11.cc
index 96f20cca2160c9983c4ea002fb5be5eec4dd92e0..9b7f207d3d02de3dfa5d98299c53dd58dfc44471 100644
--- a/ui/views/widget/desktop_aura/desktop_screen_x11.cc
+++ b/ui/views/widget/desktop_aura/desktop_screen_x11.cc
@@ -170,6 +170,18 @@ std::vector<display::Display> DesktopScreenX11::GetAllDisplays() const {
return displays_;
}
+bool DesktopScreenX11::GetDisplayWithDisplayId(
+ int64_t display_id,
+ display::Display* display) const {
+ for (display::Display display_in_list : displays_) {
+ if (display_in_list.id() == display_id) {
+ *display = display_in_list;
+ return true;
+ }
+ }
+ return false;
+}
+
display::Display DesktopScreenX11::GetDisplayNearestWindow(
gfx::NativeView window) const {
if (!window)

Powered by Google App Engine
This is Rietveld 408576698