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

Unified Diff: ash/display/screen_ash.cc

Issue 2489873002: Change GetAllDisplays() in all screens to return a const vector&. (Closed)
Patch Set: Created 4 years, 1 month 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: ash/display/screen_ash.cc
diff --git a/ash/display/screen_ash.cc b/ash/display/screen_ash.cc
index bc1a81cf7da8eba43d3cbaf24536d33255005cc2..70dd5a82a7b02bb5c836806983dba350c396ce27 100644
--- a/ash/display/screen_ash.cc
+++ b/ash/display/screen_ash.cc
@@ -45,7 +45,7 @@ class ScreenForShutdown : public display::Screen {
return NULL;
}
int GetNumDisplays() const override { return display_list_.size(); }
- std::vector<display::Display> GetAllDisplays() const override {
+ const std::vector<display::Display>& GetAllDisplays() const override {
return display_list_;
}
display::Display GetDisplayNearestWindow(
@@ -110,7 +110,7 @@ int ScreenAsh::GetNumDisplays() const {
return GetDisplayManager()->GetNumDisplays();
}
-std::vector<display::Display> ScreenAsh::GetAllDisplays() const {
+const std::vector<display::Display>& ScreenAsh::GetAllDisplays() const {
return GetDisplayManager()->active_display_list();
}

Powered by Google App Engine
This is Rietveld 408576698