summaryrefslogtreecommitdiffstats
path: root/chromium/ui/gfx/display_observer.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/ui/gfx/display_observer.h')
-rw-r--r--chromium/ui/gfx/display_observer.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/chromium/ui/gfx/display_observer.h b/chromium/ui/gfx/display_observer.h
index ca97247f9ed..0730f266206 100644
--- a/chromium/ui/gfx/display_observer.h
+++ b/chromium/ui/gfx/display_observer.h
@@ -5,6 +5,8 @@
#ifndef UI_GFX_DISPLAY_OBSERVER_H_
#define UI_GFX_DISPLAY_OBSERVER_H_
+#include <stdint.h>
+
#include "ui/gfx/gfx_export.h"
namespace gfx {
@@ -15,8 +17,13 @@ class Display;
// |DisplaySettingsProvier|. crbug.com/122863.
class GFX_EXPORT DisplayObserver {
public:
- // Called when the |display|'s bound has changed.
- virtual void OnDisplayBoundsChanged(const Display& display) = 0;
+ enum DisplayMetric {
+ DISPLAY_METRIC_NONE = 0,
+ DISPLAY_METRIC_BOUNDS = 1 << 0,
+ DISPLAY_METRIC_WORK_AREA = 1 << 1,
+ DISPLAY_METRIC_DEVICE_SCALE_FACTOR = 1 << 2,
+ DISPLAY_METRIC_ROTATION = 1 << 3,
+ };
// Called when |new_display| has been added.
virtual void OnDisplayAdded(const Display& new_display) = 0;
@@ -24,6 +31,11 @@ class GFX_EXPORT DisplayObserver {
// Called when |old_display| has been removed.
virtual void OnDisplayRemoved(const Display& old_display) = 0;
+ // Called when a |display| has one or more metrics changed. |changed_metrics|
+ // will contain the information about the change, see |DisplayMetric|.
+ virtual void OnDisplayMetricsChanged(const Display& display,
+ uint32_t changed_metrics) = 0;
+
protected:
virtual ~DisplayObserver();
};