Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_SCREEN_X11_H_ | 5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_SCREEN_X11_H_ |
| 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_SCREEN_X11_H_ | 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_SCREEN_X11_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 64 // Constructor used in tests. | 64 // Constructor used in tests. |
| 65 DesktopScreenX11(const std::vector<gfx::Display>& test_displays); | 65 DesktopScreenX11(const std::vector<gfx::Display>& test_displays); |
| 66 | 66 |
| 67 // Builds a list of displays from the current screen information offered by | 67 // Builds a list of displays from the current screen information offered by |
| 68 // the X server. | 68 // the X server. |
| 69 std::vector<gfx::Display> BuildDisplaysFromXRandRInfo(); | 69 std::vector<gfx::Display> BuildDisplaysFromXRandRInfo(); |
| 70 | 70 |
| 71 // We delay updating the display so we can coalesce events. | 71 // We delay updating the display so we can coalesce events. |
| 72 void ConfigureTimerFired(); | 72 void ConfigureTimerFired(); |
| 73 | 73 |
| 74 void SetDisplaysInternal(const std::vector<gfx::Display>& displays); | |
|
Daniel Erat
2016/04/08 20:06:38
nit: add a comment describing what this does, e.g.
oshima
2016/04/08 20:16:09
Done.
| |
| 75 | |
| 74 Display* xdisplay_; | 76 Display* xdisplay_; |
| 75 ::Window x_root_window_; | 77 ::Window x_root_window_; |
| 76 | 78 |
| 77 // Whether the x server supports the XRandR extension. | 79 // Whether the x server supports the XRandR extension. |
| 78 bool has_xrandr_; | 80 bool has_xrandr_; |
| 79 | 81 |
| 80 // The base of the event numbers used to represent XRandr events used in | 82 // The base of the event numbers used to represent XRandr events used in |
| 81 // decoding events regarding output add/remove. | 83 // decoding events regarding output add/remove. |
| 82 int xrandr_event_base_; | 84 int xrandr_event_base_; |
| 83 | 85 |
| 84 // The display objects we present to chrome. | 86 // The display objects we present to chrome. |
| 85 std::vector<gfx::Display> displays_; | 87 std::vector<gfx::Display> displays_; |
| 86 | 88 |
| 87 // The timer to delay configuring outputs. See also the comments in | 89 // The timer to delay configuring outputs. See also the comments in |
| 88 // Dispatch(). | 90 // Dispatch(). |
| 89 scoped_ptr<base::OneShotTimer> configure_timer_; | 91 scoped_ptr<base::OneShotTimer> configure_timer_; |
| 90 | 92 |
| 91 gfx::DisplayChangeNotifier change_notifier_; | 93 gfx::DisplayChangeNotifier change_notifier_; |
| 92 | 94 |
| 93 DISALLOW_COPY_AND_ASSIGN(DesktopScreenX11); | 95 DISALLOW_COPY_AND_ASSIGN(DesktopScreenX11); |
| 94 }; | 96 }; |
| 95 | 97 |
| 96 } // namespace views | 98 } // namespace views |
| 97 | 99 |
| 98 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_SCREEN_X11_H_ | 100 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_SCREEN_X11_H_ |
| OLD | NEW |