Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(811)

Side by Side Diff: ui/display/display_observer.h

Issue 2824843002: MD Settings: Display: Disable orientaiton control in tablet mode (Closed)
Patch Set: Add test and trigger onDisplayChanged Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/closure_compiler/externs/system_display.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 display { 12 namespace display {
13 class Display; 13 class Display;
14 14
15 // Observers for display configuration changes. 15 // Observers for display configuration changes.
16 // TODO(oshima): consolidate |WorkAreaWatcherObserver| and 16 // TODO(oshima): consolidate |WorkAreaWatcherObserver| and
17 // |DisplaySettingsProvier|. crbug.com/122863. 17 // |DisplaySettingsProvier|. crbug.com/122863.
18 class DISPLAY_EXPORT DisplayObserver { 18 class DISPLAY_EXPORT DisplayObserver {
19 public: 19 public:
20 enum DisplayMetric { 20 enum DisplayMetric {
21 DISPLAY_METRIC_NONE = 0, 21 DISPLAY_METRIC_NONE = 0,
22 DISPLAY_METRIC_BOUNDS = 1 << 0, 22 DISPLAY_METRIC_BOUNDS = 1 << 0,
23 DISPLAY_METRIC_WORK_AREA = 1 << 1, 23 DISPLAY_METRIC_WORK_AREA = 1 << 1,
24 DISPLAY_METRIC_DEVICE_SCALE_FACTOR = 1 << 2, 24 DISPLAY_METRIC_DEVICE_SCALE_FACTOR = 1 << 2,
25 DISPLAY_METRIC_ROTATION = 1 << 3, 25 DISPLAY_METRIC_ROTATION = 1 << 3,
26 DISPLAY_METRIC_PRIMARY = 1 << 4, 26 DISPLAY_METRIC_PRIMARY = 1 << 4,
27 DISPLAY_METRIC_MIRROR_STATE = 1 << 5, 27 DISPLAY_METRIC_MIRROR_STATE = 1 << 5,
28 DISPLAY_METRIC_MAXIMIZE_MODE = 1 << 6,
28 }; 29 };
29 30
30 // Called when |new_display| has been added. 31 // Called when |new_display| has been added.
31 virtual void OnDisplayAdded(const Display& new_display); 32 virtual void OnDisplayAdded(const Display& new_display);
32 33
33 // Called when |old_display| has been removed. 34 // Called when |old_display| has been removed.
34 virtual void OnDisplayRemoved(const Display& old_display); 35 virtual void OnDisplayRemoved(const Display& old_display);
35 36
36 // Called when a |display| has one or more metrics changed. |changed_metrics| 37 // Called when a |display| has one or more metrics changed. |changed_metrics|
37 // will contain the information about the change, see |DisplayMetric|. 38 // will contain the information about the change, see |DisplayMetric|.
38 virtual void OnDisplayMetricsChanged(const Display& display, 39 virtual void OnDisplayMetricsChanged(const Display& display,
39 uint32_t changed_metrics); 40 uint32_t changed_metrics);
40 41
41 protected: 42 protected:
42 virtual ~DisplayObserver(); 43 virtual ~DisplayObserver();
43 }; 44 };
44 45
45 } // namespace display 46 } // namespace display
46 47
47 #endif // UI_DISPLAY_DISPLAY_OBSERVER_H_ 48 #endif // UI_DISPLAY_DISPLAY_OBSERVER_H_
OLDNEW
« no previous file with comments | « third_party/closure_compiler/externs/system_display.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698