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 "base/timer/timer.h" | 8 #include "base/timer/timer.h" |
9 #include "ui/events/platform/platform_event_dispatcher.h" | 9 #include "ui/events/platform/platform_event_dispatcher.h" |
10 #include "ui/gfx/display_change_notifier.h" | 10 #include "ui/gfx/display_change_notifier.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 gfx::Display GetDisplayNearestPoint(const gfx::Point& point) const override; | 44 gfx::Display GetDisplayNearestPoint(const gfx::Point& point) const override; |
45 gfx::Display GetDisplayMatching(const gfx::Rect& match_rect) const override; | 45 gfx::Display GetDisplayMatching(const gfx::Rect& match_rect) const override; |
46 gfx::Display GetPrimaryDisplay() const override; | 46 gfx::Display GetPrimaryDisplay() const override; |
47 void AddObserver(gfx::DisplayObserver* observer) override; | 47 void AddObserver(gfx::DisplayObserver* observer) override; |
48 void RemoveObserver(gfx::DisplayObserver* observer) override; | 48 void RemoveObserver(gfx::DisplayObserver* observer) override; |
49 | 49 |
50 // ui::PlatformEventDispatcher: | 50 // ui::PlatformEventDispatcher: |
51 bool CanDispatchEvent(const ui::PlatformEvent& event) override; | 51 bool CanDispatchEvent(const ui::PlatformEvent& event) override; |
52 uint32_t DispatchEvent(const ui::PlatformEvent& event) override; | 52 uint32_t DispatchEvent(const ui::PlatformEvent& event) override; |
53 | 53 |
| 54 static void UpdateDeviceScaleFactorForTest(); |
| 55 |
54 private: | 56 private: |
55 friend class DesktopScreenX11Test; | 57 friend class DesktopScreenX11Test; |
56 friend class test::DesktopScreenX11TestApi; | 58 friend class test::DesktopScreenX11TestApi; |
57 | 59 |
58 // Constructor used in tests. | 60 // Constructor used in tests. |
59 DesktopScreenX11(const std::vector<gfx::Display>& test_displays); | 61 DesktopScreenX11(const std::vector<gfx::Display>& test_displays); |
60 | 62 |
61 // Builds a list of displays from the current screen information offered by | 63 // Builds a list of displays from the current screen information offered by |
62 // the X server. | 64 // the X server. |
63 std::vector<gfx::Display> BuildDisplaysFromXRandRInfo(); | 65 std::vector<gfx::Display> BuildDisplaysFromXRandRInfo(); |
(...skipping 19 matching lines...) Expand all Loading... |
83 scoped_ptr<base::OneShotTimer> configure_timer_; | 85 scoped_ptr<base::OneShotTimer> configure_timer_; |
84 | 86 |
85 gfx::DisplayChangeNotifier change_notifier_; | 87 gfx::DisplayChangeNotifier change_notifier_; |
86 | 88 |
87 DISALLOW_COPY_AND_ASSIGN(DesktopScreenX11); | 89 DISALLOW_COPY_AND_ASSIGN(DesktopScreenX11); |
88 }; | 90 }; |
89 | 91 |
90 } // namespace views | 92 } // namespace views |
91 | 93 |
92 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_SCREEN_X11_H_ | 94 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_SCREEN_X11_H_ |
OLD | NEW |