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

Unified Diff: ash/display/display_info.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_change_observer_x11_unittest.cc ('k') | ash/display/display_info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « ash/display/display_change_observer_x11_unittest.cc ('k') | ash/display/display_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698