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

Unified Diff: ui/display/win/screen_win.h

Issue 2489873002: Change GetAllDisplays() in all screens to return a const vector&. (Closed)
Patch Set: roll back to rebase as dummy_screen_android is reverted 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
« no previous file with comments | « ui/display/screen_base.cc ('k') | ui/display/win/screen_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/display/win/screen_win.h
diff --git a/ui/display/win/screen_win.h b/ui/display/win/screen_win.h
index 422077d521282c11243eb15cb2a9a58e45f6f2fa..2a7cdb10de6ca5eead27df233c870382593166b0 100644
--- a/ui/display/win/screen_win.h
+++ b/ui/display/win/screen_win.h
@@ -114,7 +114,7 @@ class DISPLAY_EXPORT ScreenWin : public display::Screen {
bool IsWindowUnderCursor(gfx::NativeWindow window) override;
gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override;
int GetNumDisplays() const override;
- std::vector<display::Display> GetAllDisplays() const override;
+ const std::vector<display::Display>& GetAllDisplays() const override;
display::Display GetDisplayNearestWindow(
gfx::NativeView window) const override;
display::Display GetDisplayNearestPoint(
@@ -185,6 +185,11 @@ class DISPLAY_EXPORT ScreenWin : public display::Screen {
// Current list of ScreenWinDisplays.
std::vector<ScreenWinDisplay> screen_win_displays_;
+ // The display::Displays corresponding to |screen_win_displays_| for
+ // GetAllDisplays(). This must be updated anytime |screen_win_displays_| is
+ // updated.
+ std::vector<display::Display> displays_;
+
DISALLOW_COPY_AND_ASSIGN(ScreenWin);
};
« no previous file with comments | « ui/display/screen_base.cc ('k') | ui/display/win/screen_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698