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

Unified Diff: ash/display/display_manager.h

Issue 11818008: Automatically set the overscan insets if the output has the flag and no preference is set. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 | « no previous file | 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 292da15f898c56cde0745166b1aa001a83f3c70d..accf7b73869e27585240f71475e99b042f6beed6 100644
--- a/ash/display/display_manager.h
+++ b/ash/display/display_manager.h
@@ -123,6 +123,7 @@ class ASH_EXPORT DisplayManager : public aura::RootWindowObserver {
FRIEND_TEST_ALL_PREFIXES(DisplayManagerTest, TestNativeDisplaysChanged);
FRIEND_TEST_ALL_PREFIXES(DisplayManagerTest,
NativeDisplaysChangedAfterPrimaryChange);
+ FRIEND_TEST_ALL_PREFIXES(DisplayManagerTest, AutomaticOverscanInsets);
friend class ash::AcceleratorControllerTest;
friend class test::DisplayManagerTestApi;
friend class DisplayManagerTest;
@@ -132,6 +133,8 @@ class ASH_EXPORT DisplayManager : public aura::RootWindowObserver {
// Metadata for each display.
struct DisplayInfo {
+ DisplayInfo();
+
// The cached name of the display.
std::string name;
@@ -141,6 +144,14 @@ class ASH_EXPORT DisplayManager : public aura::RootWindowObserver {
// The overscan insets for the display.
gfx::Insets overscan_insets_in_dip;
+
+ // True if we detect that the display has overscan area. False if the
+ // display doesn't have it, or failed to detect it.
+ bool has_overscan;
+
+ // True if the |overscan_insets_in_dip| is specified. This is set because
+ // the user may specify an empty inset intentionally.
+ bool has_custom_overscan_insets;
};
void Init();
@@ -162,8 +173,8 @@ class ASH_EXPORT DisplayManager : public aura::RootWindowObserver {
// the center of the nearest display if it's outside of all displays.
void EnsurePointerInDisplays();
- // Updates |display_names_| by calling platform-dependent functions.
- void RefreshDisplayNames();
+ // Updates |display_info_| by calling platform-dependent functions.
+ void RefreshDisplayInfo();
// Update the display's id in the |display_list| to match the ones
// stored in this display manager's |displays_|. This is used to
@@ -171,6 +182,9 @@ class ASH_EXPORT DisplayManager : public aura::RootWindowObserver {
// display list with the same display ids but with different bounds
void SetDisplayIdsForTest(DisplayList* display_list) const;
+ // Forcibly specify 'has_overscan' flag of the DisplayInfo for specified |id|.
+ void SetHasOverscanFlagForTest(int64 id, bool has_overscan);
+
DisplayList displays_;
int64 internal_display_id_;
« no previous file with comments | « no previous file | ash/display/display_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698