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

Unified Diff: ash/display/display_manager.h

Issue 11417121: Undo all existing overscan settings before updating to a new overscan settings (2nd) (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 | « ash/display/display_controller_unittest.cc ('k') | ash/display/display_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/display_manager.h
diff --git a/ash/display/display_manager.h b/ash/display/display_manager.h
index a3c8b12a87704d4e32d35275c421732ac063d5ea..292da15f898c56cde0745166b1aa001a83f3c70d 100644
--- a/ash/display/display_manager.h
+++ b/ash/display/display_manager.h
@@ -86,6 +86,9 @@ class ASH_EXPORT DisplayManager : public aura::RootWindowObserver {
// contains each display's new infomration.
void OnNativeDisplaysChanged(const std::vector<gfx::Display>& displays);
+ // Updates the internal display data and notifies observers about the changes.
+ void UpdateDisplays(const std::vector<gfx::Display>& displays);
+
// Create a root window for given |display|.
aura::RootWindow* CreateRootWindowForDisplay(const gfx::Display& display);
@@ -127,6 +130,19 @@ class ASH_EXPORT DisplayManager : public aura::RootWindowObserver {
typedef std::vector<gfx::Display> DisplayList;
+ // Metadata for each display.
+ struct DisplayInfo {
+ // The cached name of the display.
+ std::string name;
+
+ // The original bounds_in_pixel for the display. This can be different from
+ // the current one in case of overscan insets.
+ gfx::Rect original_bounds_in_pixel;
+
+ // The overscan insets for the display.
+ gfx::Insets overscan_insets_in_dip;
+ };
+
void Init();
void CycleDisplayImpl();
void ScaleDisplayImpl();
@@ -164,11 +180,8 @@ class ASH_EXPORT DisplayManager : public aura::RootWindowObserver {
bool force_bounds_changed_;
- // 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_;
+ // The mapping from the display ID to its internal data.
+ std::map<int64, DisplayInfo> display_info_;
DISALLOW_COPY_AND_ASSIGN(DisplayManager);
};
« no previous file with comments | « ash/display/display_controller_unittest.cc ('k') | ash/display/display_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698