| 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 24 matching lines...) Expand all Loading... |
| 35 is_primary_(is_primary), | 35 is_primary_(is_primary), |
| 36 cursor_storage_(cursor_storage) { | 36 cursor_storage_(cursor_storage) { |
| 37 display_metrics_.bounds = gfx::Rect(0, 0, 400, 300); | 37 display_metrics_.bounds = gfx::Rect(0, 0, 400, 300); |
| 38 display_metrics_.device_scale_factor = 1.f; | 38 display_metrics_.device_scale_factor = 1.f; |
| 39 } | 39 } |
| 40 ~TestPlatformDisplay() override {} | 40 ~TestPlatformDisplay() override {} |
| 41 | 41 |
| 42 // PlatformDisplay: | 42 // PlatformDisplay: |
| 43 void Init(PlatformDisplayDelegate* delegate) override {} | 43 void Init(PlatformDisplayDelegate* delegate) override {} |
| 44 int64_t GetId() const override { return id_; } | 44 int64_t GetId() const override { return id_; } |
| 45 void SchedulePaint(const ServerWindow* window, | |
| 46 const gfx::Rect& bounds) override {} | |
| 47 void SetViewportSize(const gfx::Size& size) override {} | 45 void SetViewportSize(const gfx::Size& size) override {} |
| 48 void SetTitle(const base::string16& title) override {} | 46 void SetTitle(const base::string16& title) override {} |
| 49 void SetCapture() override {} | 47 void SetCapture() override {} |
| 50 void ReleaseCapture() override {} | 48 void ReleaseCapture() override {} |
| 51 void SetCursorById(mojom::Cursor cursor) override { | 49 void SetCursorById(mojom::Cursor cursor) override { |
| 52 *cursor_storage_ = cursor; | 50 *cursor_storage_ = cursor; |
| 53 } | 51 } |
| 54 void UpdateTextInputState(const ui::TextInputState& state) override {} | 52 void UpdateTextInputState(const ui::TextInputState& state) override {} |
| 55 void SetImeVisibility(bool visible) override {} | 53 void SetImeVisibility(bool visible) override {} |
| 56 bool IsFramePending() const override { return false; } | |
| 57 gfx::Rect GetBounds() const override { return display_metrics_.bounds; } | 54 gfx::Rect GetBounds() const override { return display_metrics_.bounds; } |
| 58 bool UpdateViewportMetrics(const display::ViewportMetrics& metrics) override { | 55 bool UpdateViewportMetrics(const display::ViewportMetrics& metrics) override { |
| 59 if (display_metrics_ == metrics) | 56 if (display_metrics_ == metrics) |
| 60 return false; | 57 return false; |
| 61 display_metrics_ = metrics; | 58 display_metrics_ = metrics; |
| 62 return true; | 59 return true; |
| 63 } | 60 } |
| 64 const display::ViewportMetrics& GetViewportMetrics() const override { | 61 const display::ViewportMetrics& GetViewportMetrics() const override { |
| 65 return display_metrics_; | 62 return display_metrics_; |
| 66 } | 63 } |
| (...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 592 return nullptr; | 589 return nullptr; |
| 593 if (!tree->AddWindow(parent_client_id, client_window_id)) | 590 if (!tree->AddWindow(parent_client_id, client_window_id)) |
| 594 return nullptr; | 591 return nullptr; |
| 595 *client_id = client_window_id; | 592 *client_id = client_window_id; |
| 596 return tree->GetWindowByClientId(client_window_id); | 593 return tree->GetWindowByClientId(client_window_id); |
| 597 } | 594 } |
| 598 | 595 |
| 599 } // namespace test | 596 } // namespace test |
| 600 } // namespace ws | 597 } // namespace ws |
| 601 } // namespace ui | 598 } // namespace ui |
| OLD | NEW |