| 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 23 matching lines...) Expand all Loading... |
| 34 mojom::Cursor* cursor_storage) | 34 mojom::Cursor* cursor_storage) |
| 35 : id_(id), | 35 : id_(id), |
| 36 is_primary_(is_primary), | 36 is_primary_(is_primary), |
| 37 cursor_storage_(cursor_storage) { | 37 cursor_storage_(cursor_storage) { |
| 38 display_metrics_.bounds = gfx::Rect(0, 0, 400, 300); | 38 display_metrics_.bounds = gfx::Rect(0, 0, 400, 300); |
| 39 display_metrics_.device_scale_factor = 1.f; | 39 display_metrics_.device_scale_factor = 1.f; |
| 40 } | 40 } |
| 41 ~TestPlatformDisplay() override {} | 41 ~TestPlatformDisplay() override {} |
| 42 | 42 |
| 43 // PlatformDisplay: | 43 // PlatformDisplay: |
| 44 void Init(PlatformDisplayDelegate* delegate) override { | 44 void Init(PlatformDisplayDelegate* delegate) override {} |
| 45 delegate->CreateRootWindow(display_metrics_.bounds.size()); | |
| 46 } | |
| 47 int64_t GetId() const override { return id_; } | 45 int64_t GetId() const override { return id_; } |
| 48 void SchedulePaint(const ServerWindow* window, | 46 void SchedulePaint(const ServerWindow* window, |
| 49 const gfx::Rect& bounds) override {} | 47 const gfx::Rect& bounds) override {} |
| 50 void SetViewportSize(const gfx::Size& size) override {} | 48 void SetViewportSize(const gfx::Size& size) override {} |
| 51 void SetTitle(const base::string16& title) override {} | 49 void SetTitle(const base::string16& title) override {} |
| 52 void SetCapture() override {} | 50 void SetCapture() override {} |
| 53 void ReleaseCapture() override {} | 51 void ReleaseCapture() override {} |
| 54 void SetCursorById(mojom::Cursor cursor) override { | 52 void SetCursorById(mojom::Cursor cursor) override { |
| 55 *cursor_storage_ = cursor; | 53 *cursor_storage_ = cursor; |
| 56 } | 54 } |
| (...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 610 return nullptr; | 608 return nullptr; |
| 611 if (!tree->AddWindow(parent_client_id, client_window_id)) | 609 if (!tree->AddWindow(parent_client_id, client_window_id)) |
| 612 return nullptr; | 610 return nullptr; |
| 613 *client_id = client_window_id; | 611 *client_id = client_window_id; |
| 614 return tree->GetWindowByClientId(client_window_id); | 612 return tree->GetWindowByClientId(client_window_id); |
| 615 } | 613 } |
| 616 | 614 |
| 617 } // namespace test | 615 } // namespace test |
| 618 } // namespace ws | 616 } // namespace ws |
| 619 } // namespace ui | 617 } // namespace ui |
| OLD | NEW |