OLD | NEW |
(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 |
OLD | NEW |