summaryrefslogtreecommitdiffstats
path: root/ash/screen_ash.h
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-14 10:10:58 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-14 10:10:58 +0000
commit6bdf795e8f7dcfe80dd33b06bab229fd8a4d49f9 (patch)
tree842af6ec5fd894feb6b1d6cad3c38c4682966c57 /ash/screen_ash.h
parent647aeccd73b8598e1373987d34e7f16a6d5b39b7 (diff)
downloadchromium_src-6bdf795e8f7dcfe80dd33b06bab229fd8a4d49f9.zip
chromium_src-6bdf795e8f7dcfe80dd33b06bab229fd8a4d49f9.tar.gz
chromium_src-6bdf795e8f7dcfe80dd33b06bab229fd8a4d49f9.tar.bz2
- Move DisplayManager and DisplayChangeObserverX11 from aura
to ash.DisplayManager/DisplayChangeObserverX11 are in aura for historical reason, but they no longer have to be in aura. * Remove SingleDisplayManager as it's no longer necessary. * Rename MultipleDisplayManager and consolidate into DisplayManager. * Remove DisplayManager from desktop environment. Screen information is managed by platform in desktop environment, and should be provided via gfx::Screen implementation. - Move DisplayObserver to ui/gfx. This should be consolicated with other similar features such as WorkAreaWatcherObserver/ DisplaySettingsProvider. It's tracked in crbug.com/122863. - Misc cleanups * Test should use test_support_ash instead of including individual files. * Use TestScreen where appropriate. BUG=159710, 122863 TEST=none Review URL: https://chromiumcodereview.appspot.com/11363124 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167639 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/screen_ash.h')
-rw-r--r--ash/screen_ash.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/ash/screen_ash.h b/ash/screen_ash.h
index b737bfc..7e1d108 100644
--- a/ash/screen_ash.h
+++ b/ash/screen_ash.h
@@ -7,6 +7,7 @@
#include "ash/ash_export.h"
#include "base/compiler_specific.h"
+#include "base/observer_list.h"
#include "ui/gfx/screen.h"
namespace gfx {
@@ -55,12 +56,16 @@ class ASH_EXPORT ScreenAsh : public gfx::Screen {
// invalid display if no such display is connected.
static const gfx::Display& GetDisplayForId(int64 display_id);
+ // Notifies observers of display configuration changes.
+ void NotifyBoundsChanged(const gfx::Display& display);
+ void NotifyDisplayAdded(const gfx::Display& display);
+ void NotifyDisplayRemoved(const gfx::Display& display);
+
protected:
// Implementation of gfx::Screen:
virtual bool IsDIPEnabled() OVERRIDE;
virtual gfx::Point GetCursorScreenPoint() OVERRIDE;
virtual gfx::NativeWindow GetWindowAtCursorScreenPoint() OVERRIDE;
-
virtual int GetNumDisplays() OVERRIDE;
virtual gfx::Display GetDisplayNearestWindow(
gfx::NativeView view) const OVERRIDE;
@@ -69,8 +74,12 @@ class ASH_EXPORT ScreenAsh : public gfx::Screen {
virtual gfx::Display GetDisplayMatching(
const gfx::Rect& match_rect) const OVERRIDE;
virtual gfx::Display GetPrimaryDisplay() const OVERRIDE;
+ virtual void AddObserver(gfx::DisplayObserver* observer) OVERRIDE;
+ virtual void RemoveObserver(gfx::DisplayObserver* observer) OVERRIDE;
private:
+ ObserverList<gfx::DisplayObserver> observers_;
+
DISALLOW_COPY_AND_ASSIGN(ScreenAsh);
};