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

Unified Diff: ash/display/display_manager.h

Issue 12505005: Store rotation/ui scale to local state. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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
Index: ash/display/display_manager.h
diff --git a/ash/display/display_manager.h b/ash/display/display_manager.h
index ce515125d4a3e39dd0422322a35851e179e618b9..bdb87e1857dd19c1a76faa4d39435de34ea16d4d 100644
--- a/ash/display/display_manager.h
+++ b/ash/display/display_manager.h
@@ -33,8 +33,7 @@ namespace internal {
// and notifies observers when configuration changes.
// This is exported for unittest.
//
-// TODO(oshima): gfx::Screen needs to return translated coordinates
-// if the root window is translated. crbug.com/119268.
+// TODO(oshima): Make this non internal.
class ASH_EXPORT DisplayManager : public aura::RootWindowObserver {
public:
DisplayManager();
@@ -45,6 +44,9 @@ class ASH_EXPORT DisplayManager : public aura::RootWindowObserver {
static void CycleDisplay();
static void ToggleDisplayScaleFactor();
+ // Returns next valud ui scales.
James Cook 2013/03/22 16:53:14 "Returns next valid UI scale."
oshima 2013/03/22 18:20:42 Done.
+ static float GetNextUIScale(float scale, bool up);
+
// When set to true, the MonitorManager calls OnDisplayBoundsChanged
// even if the display's bounds didn't change. Used to swap primary
// display.
@@ -89,6 +91,13 @@ class ASH_EXPORT DisplayManager : public aura::RootWindowObserver {
// Sets the display's ui scale.
void SetDisplayUIScale(int64 display_id, float ui_scale);
+ // 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);
+
// Tells if display rotation/ui scaling features are enabled.
bool IsDisplayRotationEnabled() const;
bool IsDisplayUIScalingEnabled() const;
@@ -107,6 +116,9 @@ class ASH_EXPORT DisplayManager : public aura::RootWindowObserver {
// Updates the internal display data and notifies observers about the changes.
void UpdateDisplays(const std::vector<DisplayInfo>& display_info_list);
+ // Updates current displays using current |display_info_|.
+ void UpdateDisplays();
+
// Obsoleted: Do not use in new code.
// Returns the display at |index|. The display at 0 is
// no longer considered "primary".
@@ -136,8 +148,8 @@ class ASH_EXPORT DisplayManager : public aura::RootWindowObserver {
const gfx::Display& GetDisplayMatching(
const gfx::Rect& match_rect)const;
- // Retuns the display info associated with |display|.
- const DisplayInfo& GetDisplayInfo(const gfx::Display& display) const;
+ // Retuns the display info associated with |display_id|.
+ const DisplayInfo& GetDisplayInfo(int64 display_id) const;
// Returns the human-readable name for the display |id|.
std::string GetDisplayNameForId(int64 id);

Powered by Google App Engine
This is Rietveld 408576698