Index: ash/display/screen_ash.cc |
diff --git a/ash/display/screen_ash.cc b/ash/display/screen_ash.cc |
index e91811af93d00301a090a705eca6a3b074d26378..8831c60930220076c71cad4cdc922d15f55e8293 100644 |
--- a/ash/display/screen_ash.cc |
+++ b/ash/display/screen_ash.cc |
@@ -48,6 +48,16 @@ class ScreenForShutdown : public display::Screen { |
std::vector<display::Display> GetAllDisplays() const override { |
return display_list_; |
} |
+ bool GetDisplayWithDisplayId(int64_t display_id, |
+ display::Display* display) const override { |
+ for (const display::Display& display_in_list : display_list_) { |
+ if (display_in_list.id() == display_id) { |
+ *display = display_in_list; |
+ return true; |
+ } |
+ } |
+ return false; |
+ } |
display::Display GetDisplayNearestWindow( |
gfx::NativeView view) const override { |
return primary_display_; |
@@ -114,6 +124,18 @@ std::vector<display::Display> ScreenAsh::GetAllDisplays() const { |
return GetDisplayManager()->active_display_list(); |
} |
+bool ScreenAsh::GetDisplayWithDisplayId(int64_t display_id, |
+ display::Display* display) const { |
+ for (const display::Display& display_in_list : |
+ GetDisplayManager()->active_display_list()) { |
+ if (display_in_list.id() == display_id) { |
+ *display = display_in_list; |
+ return true; |
+ } |
+ } |
+ return false; |
+} |
+ |
display::Display ScreenAsh::GetDisplayNearestWindow( |
gfx::NativeView window) const { |
if (!window) |