Index: ash/display/display_info.h |
diff --git a/ash/display/display_info.h b/ash/display/display_info.h |
index c01d13716dcfba1a889b5b9114b16db2e9ed92f9..dbf8ad59f1bed93ec074a5bc7f9215fca98a7f3b 100644 |
--- a/ash/display/display_info.h |
+++ b/ash/display/display_info.h |
@@ -5,6 +5,7 @@ |
#ifndef ASH_DISPLAY_DISPLAY_INFO_H_ |
#define ASH_DISPLAY_DISPLAY_INFO_H_ |
+#include <map> |
#include <string> |
#include <vector> |
@@ -103,9 +104,6 @@ class ASH_EXPORT DisplayInfo { |
// actual overscan automatically, but used in the message. |
bool has_overscan() const { return has_overscan_; } |
- void set_rotation(gfx::Display::Rotation rotation) { rotation_ = rotation; } |
- gfx::Display::Rotation rotation() const { return rotation_; } |
- |
void set_touch_support(gfx::Display::TouchSupport support) { |
touch_support_ = support; |
} |
@@ -139,6 +137,12 @@ class ASH_EXPORT DisplayInfo { |
float configured_ui_scale() const { return configured_ui_scale_; } |
void set_configured_ui_scale(float scale) { configured_ui_scale_ = scale; } |
+ // Sets/gets the rotation for the given |source|. Setting a new rotation will |
+ // also have it become the active rotation. |
+ void SetRotation(gfx::Display::Rotation rotation, |
+ gfx::Display::RotationSource source); |
+ gfx::Display::Rotation Rotation(gfx::Display::RotationSource source) const; |
jonross
2015/04/10 17:54:43
Getting the active rotation is a common action.
C
tdanderson
2015/04/13 22:44:46
+1 to adding that.
jonross
2015/04/15 17:43:12
Done.
|
+ |
// Returns the ui scale and device scale factor actually used to create |
// display that chrome sees. This can be different from one obtained |
// from dispaly or one specified by a user in following situation. |
@@ -231,7 +235,7 @@ class ASH_EXPORT DisplayInfo { |
int64 id_; |
std::string name_; |
bool has_overscan_; |
- gfx::Display::Rotation rotation_; |
+ std::map<gfx::Display::RotationSource, gfx::Display::Rotation> rotations_; |
gfx::Display::TouchSupport touch_support_; |
// If the display is also a touch device, it will have a positive |