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

Side by Side Diff: ash/display/display_change_observer_x11.h

Issue 23286003: ash: Get output info from chromeos instead of XRandR. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use index from XRandR Created 7 years, 4 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 | Annotate | Revision Log
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 ASH_DISPLAY_DISPLAY_CHANGE_OBSERVER_X11_H
6 #define ASH_DISPLAY_DISPLAY_CHANGE_OBSERVER_X11_H
7
8 #include <X11/Xlib.h>
9
10 // Xlib.h defines RootWindow.
11 #undef RootWindow
12
13 #include "ash/ash_export.h"
14 #include "ash/shell_observer.h"
15 #include "base/basictypes.h"
16 #include "chromeos/display/output_configurator.h"
17
18 namespace ash {
19 namespace internal {
20
21 // An object that observes changes in display configuration and
22 // update DisplayManagers.
23 class DisplayChangeObserverX11
24 : public chromeos::OutputConfigurator::StateController,
25 public chromeos::OutputConfigurator::Observer,
26 public ShellObserver {
27 public:
28 DisplayChangeObserverX11();
29 virtual ~DisplayChangeObserverX11();
30
31 // chromeos::OutputConfigurator::StateController overrides:
32 virtual chromeos::OutputState GetStateForDisplayIds(
33 const std::vector<int64>& outputs) const OVERRIDE;
34 virtual bool GetResolutionForDisplayId(int64 display_id,
35 int* width,
36 int* height) const OVERRIDE;
37
38 // Overriden from chromeos::OutputConfigurator::Observer:
39 virtual void OnDisplayModeChanged(
40 const std::vector<chromeos::OutputConfigurator::OutputSnapshot>& outputs)
41 OVERRIDE;
42
43 // Overriden from ShellObserver:
44 virtual void OnAppTerminating() OVERRIDE;
45
46 private:
47 Display* xdisplay_;
48
49 ::Window x_root_window_;
50
51 int xrandr_event_base_;
52
53 DISALLOW_COPY_AND_ASSIGN(DisplayChangeObserverX11);
54 };
55
56 } // namespace internal
57 } // namespace ash
58
59 #endif // ASH_DISPLAY_AURA_DISPLAY_CHANGE_OBSERVER_X11_H
OLDNEW
« no previous file with comments | « ash/display/display_change_observer_chromeos_unittest.cc ('k') | ash/display/display_change_observer_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698