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

Unified Diff: ash/display/multi_display_manager.h

Issue 11369042: Caches the display names in MultiDisplayManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | « no previous file | ash/display/multi_display_manager.cc » ('j') | ash/display/multi_display_manager.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/multi_display_manager.h
diff --git a/ash/display/multi_display_manager.h b/ash/display/multi_display_manager.h
index 79886465c15de9717f4164cfd655474363fd0a01..703c3414ee1bacccac0200056e79f108d506c047 100644
--- a/ash/display/multi_display_manager.h
+++ b/ash/display/multi_display_manager.h
@@ -64,6 +64,10 @@ class ASH_EXPORT MultiDisplayManager : public aura::DisplayManager,
bool UpdateWorkAreaOfDisplayNearestWindow(const aura::Window* window,
const gfx::Insets& insets);
+ // Returns the list of currently connected display names. It doesn't
+ // contain the name for the internal display.
+ std::vector<std::string> GetExternalDisplayNames() const;
+
// Returns display for given |id|;
const gfx::Display& GetDisplayForId(int64 id) const;
@@ -134,6 +138,9 @@ class ASH_EXPORT MultiDisplayManager : public aura::DisplayManager,
// the center of the nearest display if it's outside of all displays.
void EnsurePointerInDisplays();
+ // Updates |display_names_| by calling platform-dependent functions.
+ void RefreshDisplayNames();
+
// Update the display's id in the |display_list| to match the ones
// stored in this display manager's |displays_|. This is used to
// emulate display change behavior during the test byn creating the
@@ -152,6 +159,9 @@ class ASH_EXPORT MultiDisplayManager : public aura::DisplayManager,
// The mapping from the display ID to its overscan insets.
std::map<int64, gfx::Insets> overscan_mapping_;
+ // The cached display's name for the display ID.
+ std::map<int64, std::string> display_names_;
+
DISALLOW_COPY_AND_ASSIGN(MultiDisplayManager);
};
« no previous file with comments | « no previous file | ash/display/multi_display_manager.cc » ('j') | ash/display/multi_display_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698