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

Unified Diff: ui/aura/test/test_screen.cc

Issue 2361283002: Add GetDisplayWithDisplayId to display::Screen. (Closed)
Patch Set: ref, test, etc 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/aura/test/test_screen.cc
diff --git a/ui/aura/test/test_screen.cc b/ui/aura/test/test_screen.cc
index f19137c6dc5e3e675e1171ab4c42aa24dda6b905..9186f9f1beeab98ba5e3b0faf9c24895f2214fda 100644
--- a/ui/aura/test/test_screen.cc
+++ b/ui/aura/test/test_screen.cc
@@ -148,6 +148,15 @@ std::vector<display::Display> TestScreen::GetAllDisplays() const {
return std::vector<display::Display>(1, display_);
}
+bool TestScreen::GetDisplayWithDisplayId(int64_t display_id,
+ display::Display* display) const {
+ if (display_.id() == display_id) {
+ *display = display_;
+ return true;
+ }
+ return false;
+}
+
display::Display TestScreen::GetDisplayNearestWindow(
gfx::NativeWindow window) const {
return display_;

Powered by Google App Engine
This is Rietveld 408576698