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 <memory> | 10 #include <memory> |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 | 278 |
279 // A stub implementation of FrameGeneratorDelegate. | 279 // A stub implementation of FrameGeneratorDelegate. |
280 class TestFrameGeneratorDelegate : public FrameGeneratorDelegate { | 280 class TestFrameGeneratorDelegate : public FrameGeneratorDelegate { |
281 public: | 281 public: |
282 explicit TestFrameGeneratorDelegate(std::unique_ptr<ServerWindow> root); | 282 explicit TestFrameGeneratorDelegate(std::unique_ptr<ServerWindow> root); |
283 ~TestFrameGeneratorDelegate() override; | 283 ~TestFrameGeneratorDelegate() override; |
284 | 284 |
285 // FrameGeneratorDelegate: | 285 // FrameGeneratorDelegate: |
286 ServerWindow* GetRootWindow() override; | 286 ServerWindow* GetRootWindow() override; |
287 bool IsInHighContrastMode() override; | 287 bool IsInHighContrastMode() override; |
288 const ViewportMetrics& GetViewportMetrics() override; | 288 const display::ViewportMetrics& GetViewportMetrics() const override; |
289 | 289 |
290 private: | 290 private: |
291 std::unique_ptr<ServerWindow> root_; | 291 std::unique_ptr<ServerWindow> root_; |
292 ViewportMetrics metrics_; | 292 display::ViewportMetrics metrics_; |
293 | 293 |
294 DISALLOW_COPY_AND_ASSIGN(TestFrameGeneratorDelegate); | 294 DISALLOW_COPY_AND_ASSIGN(TestFrameGeneratorDelegate); |
295 }; | 295 }; |
296 | 296 |
297 // ----------------------------------------------------------------------------- | 297 // ----------------------------------------------------------------------------- |
298 | 298 |
299 class TestWindowManager : public mojom::WindowManager { | 299 class TestWindowManager : public mojom::WindowManager { |
300 public: | 300 public: |
301 TestWindowManager() | 301 TestWindowManager() |
302 : got_create_top_level_window_(false), | 302 : got_create_top_level_window_(false), |
(...skipping 22 matching lines...) Expand all Loading... |
325 bool got_display_removed() const { return got_display_removed_; } | 325 bool got_display_removed() const { return got_display_removed_; } |
326 int64_t display_removed_id() const { return display_removed_id_; } | 326 int64_t display_removed_id() const { return display_removed_id_; } |
327 | 327 |
328 private: | 328 private: |
329 // WindowManager: | 329 // WindowManager: |
330 void OnConnect(uint16_t client_id) override {} | 330 void OnConnect(uint16_t client_id) override {} |
331 void WmNewDisplayAdded(const display::Display& display, | 331 void WmNewDisplayAdded(const display::Display& display, |
332 ui::mojom::WindowDataPtr root, | 332 ui::mojom::WindowDataPtr root, |
333 bool drawn) override {} | 333 bool drawn) override {} |
334 void WmDisplayRemoved(int64_t display_id) override; | 334 void WmDisplayRemoved(int64_t display_id) override; |
| 335 void WmDisplayModified(const display::Display& display) override {} |
335 void WmSetBounds(uint32_t change_id, | 336 void WmSetBounds(uint32_t change_id, |
336 uint32_t window_id, | 337 uint32_t window_id, |
337 const gfx::Rect& bounds) override {} | 338 const gfx::Rect& bounds) override {} |
338 void WmSetProperty(uint32_t change_id, | 339 void WmSetProperty(uint32_t change_id, |
339 uint32_t window_id, | 340 uint32_t window_id, |
340 const mojo::String& name, | 341 const mojo::String& name, |
341 mojo::Array<uint8_t> value) override {} | 342 mojo::Array<uint8_t> value) override {} |
342 void WmCreateTopLevelWindow( | 343 void WmCreateTopLevelWindow( |
343 uint32_t change_id, | 344 uint32_t change_id, |
344 ClientSpecificId requesting_client_id, | 345 ClientSpecificId requesting_client_id, |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
665 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id); | 666 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id); |
666 ServerWindow* NewWindowInTreeWithParent(WindowTree* tree, | 667 ServerWindow* NewWindowInTreeWithParent(WindowTree* tree, |
667 ServerWindow* parent, | 668 ServerWindow* parent, |
668 ClientWindowId* client_id); | 669 ClientWindowId* client_id); |
669 | 670 |
670 } // namespace test | 671 } // namespace test |
671 } // namespace ws | 672 } // namespace ws |
672 } // namespace ui | 673 } // namespace ui |
673 | 674 |
674 #endif // SERVICES_UI_WS_TEST_UTILS_H_ | 675 #endif // SERVICES_UI_WS_TEST_UTILS_H_ |
OLD | NEW |