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

Unified Diff: ui/display/mac/screen_mac.mm

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/display/mac/screen_mac.mm
diff --git a/ui/display/mac/screen_mac.mm b/ui/display/mac/screen_mac.mm
index 08eb61de60974073d84899ef43147e11913b6d3d..43eb094dc587236978ec03b9f1a180caa4ca4fc4 100644
--- a/ui/display/mac/screen_mac.mm
+++ b/ui/display/mac/screen_mac.mm
@@ -138,6 +138,17 @@ class ScreenMac : public Screen {
return displays_;
}
+ bool GetDisplayWithDisplayId(int64_t display_id,
+ Display* display) const override {
+ for (Display display_in_list : displays_) {
+ if (display_in_list.id() == display_id) {
+ *display = display_in_list;
+ return true;
+ }
+ }
+ return false;
+ }
+
Display GetDisplayNearestWindow(gfx::NativeView view) const override {
NSWindow* window = nil;
#if !defined(USE_AURA)

Powered by Google App Engine
This is Rietveld 408576698