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

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

Issue 1964153002: Move Screen, its impls, DisplayObserver and DisplayChangeNotifier to ui/display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix tabs Created 4 years, 7 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 | « ui/gfx/display_change_notifier_unittest.cc ('k') | ui/gfx/display_observer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef UI_GFX_DISPLAY_OBSERVER_H_
6 #define UI_GFX_DISPLAY_OBSERVER_H_
7
8 #include <stdint.h>
9
10 #include "ui/gfx/gfx_export.h"
11
12 namespace gfx {
13 class Display;
14
15 // Observers for display configuration changes.
16 // TODO(oshima): consolidate |WorkAreaWatcherObserver| and
17 // |DisplaySettingsProvier|. crbug.com/122863.
18 class GFX_EXPORT DisplayObserver {
19 public:
20 enum DisplayMetric {
21 DISPLAY_METRIC_NONE = 0,
22 DISPLAY_METRIC_BOUNDS = 1 << 0,
23 DISPLAY_METRIC_WORK_AREA = 1 << 1,
24 DISPLAY_METRIC_DEVICE_SCALE_FACTOR = 1 << 2,
25 DISPLAY_METRIC_ROTATION = 1 << 3,
26 DISPLAY_METRIC_PRIMARY = 1 << 4,
27 };
28
29 // Called when |new_display| has been added.
30 virtual void OnDisplayAdded(const Display& new_display) = 0;
31
32 // Called when |old_display| has been removed.
33 virtual void OnDisplayRemoved(const Display& old_display) = 0;
34
35 // Called when a |display| has one or more metrics changed. |changed_metrics|
36 // will contain the information about the change, see |DisplayMetric|.
37 virtual void OnDisplayMetricsChanged(const Display& display,
38 uint32_t changed_metrics) = 0;
39
40 protected:
41 virtual ~DisplayObserver();
42 };
43
44 } // namespace gfx
45
46 #endif // UI_GFX_DISPLAY_OBSERVER_H_
OLDNEW
« no previous file with comments | « ui/gfx/display_change_notifier_unittest.cc ('k') | ui/gfx/display_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698