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

Side by Side Diff: ui/views/test/test_desktop_screen_x11.cc

Issue 2327623002: X11: Add TestDesktopScreenX11 to simulate mouse movement in ui tests (Closed)
Patch Set: Move TestDesktopScreenX11 into its own file Created 4 years, 3 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
(Empty)
1 // Copyright 2016 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 #include "ui/views/test/test_desktop_screen_x11.h"
6
7 #include "base/memory/singleton.h"
8
9 namespace views {
10 namespace test {
11
12 TestDesktopScreenX11* TestDesktopScreenX11::GetInstance() {
13 return base::Singleton<TestDesktopScreenX11>::get();
14 }
15
16 TestDesktopScreenX11::TestDesktopScreenX11() {}
17
18 TestDesktopScreenX11::~TestDesktopScreenX11() {}
19
20 gfx::Point TestDesktopScreenX11::GetCursorScreenPoint() {
21 return cursor_screen_point_;
22 }
23
24 void TestDesktopScreenX11::SetCursorScreenPoint(const gfx::Point& point) {
25 cursor_screen_point_ = point;
26 }
27
28 TestDesktopScreenX11* GetTestDesktopScreenX11() {
29 static std::unique_ptr<TestDesktopScreenX11> test_screen_instance;
30 if (!test_screen_instance.get())
31 test_screen_instance.reset(new TestDesktopScreenX11());
32 return test_screen_instance.get();
33 }
34
35 } // namespace test
36 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698