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

Unified Diff: extensions/shell/browser/shell_screen.cc

Issue 2361283002: Add GetDisplayWithDisplayId to display::Screen. (Closed)
Patch Set: id Created 4 years, 2 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: extensions/shell/browser/shell_screen.cc
diff --git a/extensions/shell/browser/shell_screen.cc b/extensions/shell/browser/shell_screen.cc
index 157750871cc0da29202df01f27b197327e5555dc..b7542f8820d27d829817f0319d9f3b9a293932c2 100644
--- a/extensions/shell/browser/shell_screen.cc
+++ b/extensions/shell/browser/shell_screen.cc
@@ -79,6 +79,15 @@ std::vector<display::Display> ShellScreen::GetAllDisplays() const {
return std::vector<display::Display>(1, display_);
}
+bool ShellScreen::GetDisplayWithDisplayId(int64_t display_id,
+ display::Display* display) const {
+ if (display_.id() == display_id) {
+ *display = display_;
+ return true;
+ }
+ return false;
+}
+
display::Display ShellScreen::GetDisplayNearestWindow(
gfx::NativeWindow window) const {
return display_;

Powered by Google App Engine
This is Rietveld 408576698