Chromium Code Reviews| Index: ui/gfx/display_observer.h |
| diff --git a/ui/gfx/display_observer.h b/ui/gfx/display_observer.h |
| index ca97247f9ede0a165208aa69810b65f1870c710d..7709503a48466295a990b3310c37100a0a27fbfb 100644 |
| --- a/ui/gfx/display_observer.h |
| +++ b/ui/gfx/display_observer.h |
| @@ -15,8 +15,12 @@ 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 MetricsType { |
|
oshima
2014/05/08 18:06:50
I believe the chrome style recommends EnumName ->
mlamouri (slow - plz ping)
2014/05/09 16:11:39
Done.
|
| + DISPLAY_METRICS_NONE = 0, |
| + DISPLAY_METRICS_BOUNDS = 1 << 0, |
| + DISPLAY_METRICS_ROTATION = 1 << 1, |
| + DISPLAY_METRICS_WORKAREA = 1 << 2, |
| + }; |
| // Called when |new_display| has been added. |
| virtual void OnDisplayAdded(const Display& new_display) = 0; |
| @@ -24,6 +28,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 |MetricsType|. |
| + virtual void OnDisplayMetricsChanged( |
| + const Display& display, MetricsType changed_metrics) = 0; |
| + |
| protected: |
| virtual ~DisplayObserver(); |
| }; |