OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_DISPLAY_DISPLAY_OBSERVER_H_ | 5 #ifndef UI_DISPLAY_DISPLAY_OBSERVER_H_ |
6 #define UI_DISPLAY_DISPLAY_OBSERVER_H_ | 6 #define UI_DISPLAY_DISPLAY_OBSERVER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "ui/display/display_export.h" | 10 #include "ui/display/display_export.h" |
11 | 11 |
12 namespace gfx { | 12 namespace display { |
13 class Display; | 13 class Display; |
14 } | |
15 | |
16 namespace display { | |
17 using Display = gfx::Display; | |
18 | 14 |
19 // Observers for display configuration changes. | 15 // Observers for display configuration changes. |
20 // TODO(oshima): consolidate |WorkAreaWatcherObserver| and | 16 // TODO(oshima): consolidate |WorkAreaWatcherObserver| and |
21 // |DisplaySettingsProvier|. crbug.com/122863. | 17 // |DisplaySettingsProvier|. crbug.com/122863. |
22 class DISPLAY_EXPORT DisplayObserver { | 18 class DISPLAY_EXPORT DisplayObserver { |
23 public: | 19 public: |
24 enum DisplayMetric { | 20 enum DisplayMetric { |
25 DISPLAY_METRIC_NONE = 0, | 21 DISPLAY_METRIC_NONE = 0, |
26 DISPLAY_METRIC_BOUNDS = 1 << 0, | 22 DISPLAY_METRIC_BOUNDS = 1 << 0, |
27 DISPLAY_METRIC_WORK_AREA = 1 << 1, | 23 DISPLAY_METRIC_WORK_AREA = 1 << 1, |
(...skipping 13 matching lines...) Expand all Loading... |
41 virtual void OnDisplayMetricsChanged(const Display& display, | 37 virtual void OnDisplayMetricsChanged(const Display& display, |
42 uint32_t changed_metrics) = 0; | 38 uint32_t changed_metrics) = 0; |
43 | 39 |
44 protected: | 40 protected: |
45 virtual ~DisplayObserver(); | 41 virtual ~DisplayObserver(); |
46 }; | 42 }; |
47 | 43 |
48 } // namespace display | 44 } // namespace display |
49 | 45 |
50 #endif // UI_DISPLAY_DISPLAY_OBSERVER_H_ | 46 #endif // UI_DISPLAY_DISPLAY_OBSERVER_H_ |
OLD | NEW |