Index: ash/display/display_info.h |
diff --git a/ash/display/display_info.h b/ash/display/display_info.h |
index a679a73807bfbf021b353f62fa95951657a833ae..899dd1541a2cfedde2be454db11c1a6690eba42c 100644 |
--- a/ash/display/display_info.h |
+++ b/ash/display/display_info.h |
@@ -6,6 +6,7 @@ |
#define ASH_DISPLAY_DISPLAY_INFO_H_ |
#include <string> |
+#include <vector> |
#include "ash/ash_export.h" |
#include "base/gtest_prod_util.h" |
@@ -16,6 +17,15 @@ |
namespace ash { |
namespace internal { |
+// A struct that represents the display's resolution and |
+// interlaced info. |
+struct ASH_EXPORT Resolution { |
+ Resolution(const gfx::Size& size, bool interlaced); |
+ |
+ gfx::Size size; |
+ bool interlaced; |
+}; |
+ |
// DisplayInfo contains metadata for each display. This is used to |
// create |gfx::Display| as well as to maintain extra infomation |
// to manage displays in ash environment. |
@@ -114,9 +124,21 @@ class ASH_EXPORT DisplayInfo { |
void set_native(bool native) { native_ = native; } |
bool native() const { return native_; } |
- // Returns a string representation of the DisplayInfo; |
+ const std::vector<Resolution>& resolutions() const { |
+ return resolutions_; |
+ } |
+ void set_resolutions(std::vector<Resolution>& resolution) { |
+ resolutions_.swap(resolution); |
+ } |
+ |
+ // Returns a string representation of the DisplayInfo |
+ // excluding resolutions. |
std::string ToString() const; |
+ // Returns a string representation of the DisplayInfo |
+ // including resolutions. |
+ std::string ToFullString() const; |
+ |
private: |
int64 id_; |
std::string name_; |
@@ -134,6 +156,9 @@ class ASH_EXPORT DisplayInfo { |
// True if this comes from native platform (DisplayChangeObserverX11). |
bool native_; |
+ |
+ // The list of resolutions supported by this display. |
+ std::vector<Resolution> resolutions_; |
}; |
} // namespace internal |