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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_screen_x11.h

Issue 2207043002: SetDeviceScaleFactorForTest Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: SetDeviceScaleFactorForTest Created 4 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
OLDNEW
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 <memory> 10 #include <memory>
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 std::vector<display::Display> GetAllDisplays() const override; 44 std::vector<display::Display> GetAllDisplays() const override;
45 display::Display GetDisplayNearestWindow( 45 display::Display GetDisplayNearestWindow(
46 gfx::NativeView window) const override; 46 gfx::NativeView window) const override;
47 display::Display GetDisplayNearestPoint( 47 display::Display GetDisplayNearestPoint(
48 const gfx::Point& point) const override; 48 const gfx::Point& point) const override;
49 display::Display GetDisplayMatching( 49 display::Display GetDisplayMatching(
50 const gfx::Rect& match_rect) const override; 50 const gfx::Rect& match_rect) const override;
51 display::Display GetPrimaryDisplay() const override; 51 display::Display GetPrimaryDisplay() const override;
52 void AddObserver(display::DisplayObserver* observer) override; 52 void AddObserver(display::DisplayObserver* observer) override;
53 void RemoveObserver(display::DisplayObserver* observer) override; 53 void RemoveObserver(display::DisplayObserver* observer) override;
54 void SetDeviceScaleFactorForTest(float scale_factor) override;
54 55
55 // ui::PlatformEventDispatcher: 56 // ui::PlatformEventDispatcher:
56 bool CanDispatchEvent(const ui::PlatformEvent& event) override; 57 bool CanDispatchEvent(const ui::PlatformEvent& event) override;
57 uint32_t DispatchEvent(const ui::PlatformEvent& event) override; 58 uint32_t DispatchEvent(const ui::PlatformEvent& event) override;
58 59
59 static void UpdateDeviceScaleFactorForTest();
60
61 private: 60 private:
62 friend class DesktopScreenX11Test; 61 friend class DesktopScreenX11Test;
63 friend class test::DesktopScreenX11TestApi; 62 friend class test::DesktopScreenX11TestApi;
64 63
65 // Constructor used in tests. 64 // Constructor used in tests.
66 DesktopScreenX11(const std::vector<display::Display>& test_displays); 65 DesktopScreenX11(const std::vector<display::Display>& test_displays);
67 66
68 // 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
69 // the X server. 68 // the X server.
70 std::vector<display::Display> BuildDisplaysFromXRandRInfo(); 69 std::vector<display::Display> BuildDisplaysFromXRandRInfo();
(...skipping 27 matching lines...) Expand all
98 display::DisplayChangeNotifier change_notifier_; 97 display::DisplayChangeNotifier change_notifier_;
99 98
100 ui::X11AtomCache atom_cache_; 99 ui::X11AtomCache atom_cache_;
101 100
102 DISALLOW_COPY_AND_ASSIGN(DesktopScreenX11); 101 DISALLOW_COPY_AND_ASSIGN(DesktopScreenX11);
103 }; 102 };
104 103
105 } // namespace views 104 } // namespace views
106 105
107 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_SCREEN_X11_H_ 106 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_SCREEN_X11_H_
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_screen_unittest.cc ('k') | ui/views/widget/desktop_aura/desktop_screen_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698