| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 #include "services/ui/ws/test_utils.h" | 5 #include "services/ui/ws/test_utils.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "cc/output/copy_output_request.h" | 10 #include "cc/output/copy_output_request.h" |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 void TestScreenManager::Init(display::ScreenManagerDelegate* delegate) { | 135 void TestScreenManager::Init(display::ScreenManagerDelegate* delegate) { |
| 136 delegate_ = delegate; | 136 delegate_ = delegate; |
| 137 | 137 |
| 138 // Reset everything. | 138 // Reset everything. |
| 139 display_ids_.clear(); | 139 display_ids_.clear(); |
| 140 display::Screen::SetScreenInstance(nullptr); | 140 display::Screen::SetScreenInstance(nullptr); |
| 141 screen_ = base::MakeUnique<display::ScreenBase>(); | 141 screen_ = base::MakeUnique<display::ScreenBase>(); |
| 142 display::Screen::SetScreenInstance(screen_.get()); | 142 display::Screen::SetScreenInstance(screen_.get()); |
| 143 } | 143 } |
| 144 | 144 |
| 145 display::ScreenBase* TestScreenManager::GetScreen() { |
| 146 return screen_.get(); |
| 147 } |
| 148 |
| 145 // TestPlatformDisplayFactory ------------------------------------------------- | 149 // TestPlatformDisplayFactory ------------------------------------------------- |
| 146 | 150 |
| 147 TestPlatformDisplayFactory::TestPlatformDisplayFactory( | 151 TestPlatformDisplayFactory::TestPlatformDisplayFactory( |
| 148 mojom::CursorType* cursor_storage) | 152 mojom::CursorType* cursor_storage) |
| 149 : cursor_storage_(cursor_storage) {} | 153 : cursor_storage_(cursor_storage) {} |
| 150 | 154 |
| 151 TestPlatformDisplayFactory::~TestPlatformDisplayFactory() {} | 155 TestPlatformDisplayFactory::~TestPlatformDisplayFactory() {} |
| 152 | 156 |
| 153 std::unique_ptr<PlatformDisplay> | 157 std::unique_ptr<PlatformDisplay> |
| 154 TestPlatformDisplayFactory::CreatePlatformDisplay( | 158 TestPlatformDisplayFactory::CreatePlatformDisplay( |
| (...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 686 if (!tree->AddWindow(parent_client_id, client_window_id)) | 690 if (!tree->AddWindow(parent_client_id, client_window_id)) |
| 687 return nullptr; | 691 return nullptr; |
| 688 if (client_id) | 692 if (client_id) |
| 689 *client_id = client_window_id; | 693 *client_id = client_window_id; |
| 690 return tree->GetWindowByClientId(client_window_id); | 694 return tree->GetWindowByClientId(client_window_id); |
| 691 } | 695 } |
| 692 | 696 |
| 693 } // namespace test | 697 } // namespace test |
| 694 } // namespace ws | 698 } // namespace ws |
| 695 } // namespace ui | 699 } // namespace ui |
| OLD | NEW |