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

Unified Diff: ash/display/display_manager.h

Issue 21297003: Add ability to set resolution on external display (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: adraddressed comment, adjusted test Created 7 years, 5 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
« no previous file with comments | « ash/display/display_info.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 bfecbdc3426aabcef6cbaf2d2bbec24853dd06ad..24303e1909b15ed14019713030f251a84d07e5e6 100644
--- a/ash/display/display_manager.h
+++ b/ash/display/display_manager.h
@@ -130,12 +130,20 @@ class ASH_EXPORT DisplayManager
// Sets the display's ui scale.
void SetDisplayUIScale(int64 display_id, float ui_scale);
+ // Sets the display's resolution.
+ void SetDisplayResolution(int64 display_id, const gfx::Size& resolution);
+
// Register per display properties. |overscan_insets| is NULL if
// the display has no custom overscan insets.
void RegisterDisplayProperty(int64 display_id,
gfx::Display::Rotation rotation,
float ui_scale,
- const gfx::Insets* overscan_insets);
+ const gfx::Insets* overscan_insets,
+ const gfx::Size& resolution_in_pixels);
+
+ // Returns the display's selected resolution.
+ bool GetSelectedResolutionForDisplayId(int64 display_id,
+ gfx::Size* resolution_out) const;
// Tells if display rotation/ui scaling features are enabled.
bool IsDisplayRotationEnabled() const;
@@ -270,6 +278,9 @@ private:
// The mapping from the display ID to its internal data.
std::map<int64, DisplayInfo> display_info_;
+ // Selected resolutions for displays. Key is the displays' ID.
+ std::map<int64, gfx::Size> resolutions_;
+
// When set to true, the host window's resize event updates
// the display's size. This is set to true when running on
// desktop environment (for debugging) so that resizing the host
« no previous file with comments | « ash/display/display_info.cc ('k') | ash/display/display_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698