Index: ash/display/screen_ash.cc |
diff --git a/ash/display/screen_ash.cc b/ash/display/screen_ash.cc |
index e91811af93d00301a090a705eca6a3b074d26378..8bcf74c968d9e5a3b6441e691f819b70c3ab264f 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 (display::Display display_in_list : display_list_) { |
sadrul
2016/09/23 19:51:12
const&
riajiang
2016/10/05 14:54:11
Done.
|
+ 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,17 @@ std::vector<display::Display> ScreenAsh::GetAllDisplays() const { |
return GetDisplayManager()->active_display_list(); |
} |
+bool ScreenAsh::GetDisplayWithDisplayId(int64_t display_id, |
+ display::Display* display) const { |
+ for (display::Display display_in_list : GetAllDisplays()) { |
sadrul
2016/09/23 19:51:12
GetAllDisplays() makes a copy of the list. It'd be
riajiang
2016/10/05 14:54:11
I see. Done.
|
+ 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) |