summaryrefslogtreecommitdiffstats
path: root/ash/display/display_manager.h
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-18 09:30:00 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-18 09:30:00 +0000
commitb65c59fa456760fcb59a818d8d98f7a26de5f0ad (patch)
tree81fd3b5b5aca299db72125ec3052e0b61a9b4dfb /ash/display/display_manager.h
parent0319428dfde7e055d1d10cce194225eefbebbdb3 (diff)
downloadchromium_src-b65c59fa456760fcb59a818d8d98f7a26de5f0ad.zip
chromium_src-b65c59fa456760fcb59a818d8d98f7a26de5f0ad.tar.gz
chromium_src-b65c59fa456760fcb59a818d8d98f7a26de5f0ad.tar.bz2
[Cleanup]
* Removed public API that returns pointer to internal display. * changed to use ScreenAsh::GetSecondaryDisplay instead of one in DisplayController * removed DisplayController::FindDisplayForRootWindow as there is only one caller. BUG=253991 Review URL: https://chromiumcodereview.appspot.com/19287005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212304 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/display/display_manager.h')
-rw-r--r--ash/display/display_manager.h29
1 files changed, 16 insertions, 13 deletions
diff --git a/ash/display/display_manager.h b/ash/display/display_manager.h
index fb4288e..bfecbdc 100644
--- a/ash/display/display_manager.h
+++ b/ash/display/display_manager.h
@@ -69,11 +69,12 @@ class ASH_EXPORT DisplayManager
// Returns next valid UI scale.
static float GetNextUIScale(const DisplayInfo& info, bool up);
- // Updates the bounds of |secondary_display| according to |layout|.
- static void UpdateDisplayBoundsForLayout(
+ // Updates the bounds of the display given by |secondary_display_id|
+ // according to |layout|.
+ static void UpdateDisplayBoundsForLayoutById(
const DisplayLayout& layout,
const gfx::Display& primary_display,
- gfx::Display* secondary_display);
+ int64 secondary_display_id);
DisplayManager();
virtual ~DisplayManager();
@@ -115,6 +116,9 @@ class ASH_EXPORT DisplayManager
const gfx::Display& FindDisplayContainingPoint(
const gfx::Point& point_in_screen) const;
+ // Sets the work area's |insets| to the display given by |display_id|.
+ bool UpdateWorkAreaOfDisplay(int64 display_id, const gfx::Insets& insets);
+
// Registers the overscan insets for the display of the specified ID. Note
// that the insets size should be specified in DIP size. It also triggers the
// display's bounds change.
@@ -154,10 +158,9 @@ class ASH_EXPORT DisplayManager
// 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".
- gfx::Display* GetDisplayAt(size_t index);
+ const gfx::Display& GetDisplayAt(size_t index) const;
const gfx::Display* GetPrimaryDisplayCandidate() const;
@@ -200,6 +203,9 @@ class ASH_EXPORT DisplayManager
void SetSoftwareMirroring(bool enabled);
#endif
+ // Update the bounds of the display given by |display_id|.
+ bool UpdateDisplayBounds(int64 display_id,
+ const gfx::Rect& new_bounds);
private:
FRIEND_TEST_ALL_PREFIXES(ExtendedDesktopTest, ConvertPoint);
FRIEND_TEST_ALL_PREFIXES(DisplayManagerTest, TestNativeDisplaysChanged);
@@ -210,10 +216,6 @@ private:
friend class test::DisplayManagerTestApi;
friend class test::SystemGestureEventFilterTest;
friend class DisplayManagerTest;
- // This is to allow DisplayController to modify the state of
- // DisplayManager. TODO(oshima): consider provide separate
- // interface to modify the state.
- friend class ash::DisplayController;
typedef std::vector<gfx::Display> DisplayList;
@@ -221,10 +223,7 @@ private:
change_display_upon_host_resize_ = value;
}
- gfx::Display& FindDisplayForId(int64 id);
-
- // Updates the bounds of the display given by |display_id|.
- bool UpdateDisplayBounds(int64 display_id, const gfx::Rect& new_bounds);
+ gfx::Display* FindDisplayForId(int64 id);
// Add the mirror display's display info if the software based
// mirroring is in use.
@@ -248,6 +247,10 @@ private:
bool UpdateSecondaryDisplayBoundsForLayout(DisplayList* display_list,
size_t* updated_index) const;
+ static void UpdateDisplayBoundsForLayout(
+ const DisplayLayout& layout,
+ const gfx::Display& primary_display,
+ gfx::Display* secondary_display);
Delegate* delegate_; // not owned.