| 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 // Updates |displays_| and sets FontRenderParams's scale factor. |
| 75 void SetDisplaysInternal(const std::vector<gfx::Display>& displays); |
| 76 |
| 74 Display* xdisplay_; | 77 Display* xdisplay_; |
| 75 ::Window x_root_window_; | 78 ::Window x_root_window_; |
| 76 | 79 |
| 77 // Whether the x server supports the XRandR extension. | 80 // Whether the x server supports the XRandR extension. |
| 78 bool has_xrandr_; | 81 bool has_xrandr_; |
| 79 | 82 |
| 80 // The base of the event numbers used to represent XRandr events used in | 83 // The base of the event numbers used to represent XRandr events used in |
| 81 // decoding events regarding output add/remove. | 84 // decoding events regarding output add/remove. |
| 82 int xrandr_event_base_; | 85 int xrandr_event_base_; |
| 83 | 86 |
| 84 // The display objects we present to chrome. | 87 // The display objects we present to chrome. |
| 85 std::vector<gfx::Display> displays_; | 88 std::vector<gfx::Display> displays_; |
| 86 | 89 |
| 87 // The timer to delay configuring outputs. See also the comments in | 90 // The timer to delay configuring outputs. See also the comments in |
| 88 // Dispatch(). | 91 // Dispatch(). |
| 89 scoped_ptr<base::OneShotTimer> configure_timer_; | 92 scoped_ptr<base::OneShotTimer> configure_timer_; |
| 90 | 93 |
| 91 gfx::DisplayChangeNotifier change_notifier_; | 94 gfx::DisplayChangeNotifier change_notifier_; |
| 92 | 95 |
| 93 DISALLOW_COPY_AND_ASSIGN(DesktopScreenX11); | 96 DISALLOW_COPY_AND_ASSIGN(DesktopScreenX11); |
| 94 }; | 97 }; |
| 95 | 98 |
| 96 } // namespace views | 99 } // namespace views |
| 97 | 100 |
| 98 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_SCREEN_X11_H_ | 101 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_SCREEN_X11_H_ |
| OLD | NEW |