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 #ifndef SERVICES_UI_WS_TEST_UTILS_H_ | 5 #ifndef SERVICES_UI_WS_TEST_UTILS_H_ |
6 #define SERVICES_UI_WS_TEST_UTILS_H_ | 6 #define SERVICES_UI_WS_TEST_UTILS_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 PlatformDisplay* CreatePlatformDisplay() override; | 237 PlatformDisplay* CreatePlatformDisplay() override; |
238 | 238 |
239 private: | 239 private: |
240 int32_t* cursor_id_storage_; | 240 int32_t* cursor_id_storage_; |
241 | 241 |
242 DISALLOW_COPY_AND_ASSIGN(TestPlatformDisplayFactory); | 242 DISALLOW_COPY_AND_ASSIGN(TestPlatformDisplayFactory); |
243 }; | 243 }; |
244 | 244 |
245 // ----------------------------------------------------------------------------- | 245 // ----------------------------------------------------------------------------- |
246 | 246 |
| 247 // A stub implementation of FrameGeneratorDelegate. |
| 248 class TestFrameGeneratorDelegate : public FrameGeneratorDelegate { |
| 249 public: |
| 250 explicit TestFrameGeneratorDelegate(std::unique_ptr<ServerWindow> root); |
| 251 ~TestFrameGeneratorDelegate() override; |
| 252 |
| 253 // FrameGeneratorDelegate: |
| 254 ServerWindow* GetRootWindow() override; |
| 255 void OnCompositorFrameDrawn() override {} |
| 256 const ViewportMetrics& GetViewportMetrics() override; |
| 257 |
| 258 private: |
| 259 std::unique_ptr<ServerWindow> root_; |
| 260 ViewportMetrics metrics_; |
| 261 |
| 262 DISALLOW_COPY_AND_ASSIGN(TestFrameGeneratorDelegate); |
| 263 }; |
| 264 |
| 265 // ----------------------------------------------------------------------------- |
| 266 |
247 class TestWindowManager : public mojom::WindowManager { | 267 class TestWindowManager : public mojom::WindowManager { |
248 public: | 268 public: |
249 TestWindowManager() | 269 TestWindowManager() |
250 : got_create_top_level_window_(false), | 270 : got_create_top_level_window_(false), |
251 change_id_(0u), | 271 change_id_(0u), |
252 on_accelerator_called_(false), | 272 on_accelerator_called_(false), |
253 on_accelerator_id_(0u) {} | 273 on_accelerator_id_(0u) {} |
254 ~TestWindowManager() override {} | 274 ~TestWindowManager() override {} |
255 | 275 |
256 bool did_call_create_top_level_window(uint32_t* change_id) { | 276 bool did_call_create_top_level_window(uint32_t* change_id) { |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
528 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id); | 548 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id); |
529 ServerWindow* NewWindowInTreeWithParent(WindowTree* tree, | 549 ServerWindow* NewWindowInTreeWithParent(WindowTree* tree, |
530 ServerWindow* parent, | 550 ServerWindow* parent, |
531 ClientWindowId* client_id); | 551 ClientWindowId* client_id); |
532 | 552 |
533 } // namespace test | 553 } // namespace test |
534 } // namespace ws | 554 } // namespace ws |
535 } // namespace ui | 555 } // namespace ui |
536 | 556 |
537 #endif // SERVICES_UI_WS_TEST_UTILS_H_ | 557 #endif // SERVICES_UI_WS_TEST_UTILS_H_ |
OLD | NEW |