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 TestDesktopScreenX11* GetTestDesktopScreenX11() { |
| 25 static std::unique_ptr<TestDesktopScreenX11> test_screen_instance; |
| 26 if (!test_screen_instance.get()) |
| 27 test_screen_instance.reset(new TestDesktopScreenX11()); |
| 28 return test_screen_instance.get(); |
| 29 } |
| 30 |
| 31 } // namespace test |
| 32 } // namespace views |
OLD | NEW |