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> |
| 8 |
7 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
8 #include "cc/output/copy_output_request.h" | 10 #include "cc/output/copy_output_request.h" |
9 #include "services/shell/public/interfaces/connector.mojom.h" | 11 #include "services/shell/public/interfaces/connector.mojom.h" |
10 #include "services/ui/surfaces/surfaces_state.h" | 12 #include "services/ui/surfaces/surfaces_state.h" |
11 #include "services/ui/ws/display_binding.h" | 13 #include "services/ui/ws/display_binding.h" |
12 #include "services/ui/ws/display_manager.h" | 14 #include "services/ui/ws/display_manager.h" |
13 #include "services/ui/ws/platform_display_init_params.h" | 15 #include "services/ui/ws/platform_display_init_params.h" |
14 #include "services/ui/ws/server_window_surface_manager_test_api.h" | 16 #include "services/ui/ws/server_window_surface_manager_test_api.h" |
15 #include "services/ui/ws/window_manager_access_policy.h" | 17 #include "services/ui/ws/window_manager_access_policy.h" |
16 #include "services/ui/ws/window_manager_window_tree_factory.h" | 18 #include "services/ui/ws/window_manager_window_tree_factory.h" |
(...skipping 22 matching lines...) Expand all Loading... |
39 // is created). | 41 // is created). |
40 delegate->OnViewportMetricsChanged(ViewportMetrics(), display_metrics_); | 42 delegate->OnViewportMetricsChanged(ViewportMetrics(), display_metrics_); |
41 } | 43 } |
42 void SchedulePaint(const ServerWindow* window, | 44 void SchedulePaint(const ServerWindow* window, |
43 const gfx::Rect& bounds) override {} | 45 const gfx::Rect& bounds) override {} |
44 void SetViewportSize(const gfx::Size& size) override {} | 46 void SetViewportSize(const gfx::Size& size) override {} |
45 void SetTitle(const base::string16& title) override {} | 47 void SetTitle(const base::string16& title) override {} |
46 void SetCapture() override {} | 48 void SetCapture() override {} |
47 void ReleaseCapture() override {} | 49 void ReleaseCapture() override {} |
48 void SetCursorById(int32_t cursor) override { *cursor_id_storage_ = cursor; } | 50 void SetCursorById(int32_t cursor) override { *cursor_id_storage_ = cursor; } |
49 mojom::Rotation GetRotation() override { return mojom::Rotation::VALUE_0; } | 51 ::display::Display::Rotation GetRotation() override { |
| 52 return ::display::Display::Rotation::ROTATE_0; |
| 53 } |
50 float GetDeviceScaleFactor() override { | 54 float GetDeviceScaleFactor() override { |
51 return display_metrics_.device_scale_factor; | 55 return display_metrics_.device_scale_factor; |
52 } | 56 } |
53 void UpdateTextInputState(const ui::TextInputState& state) override {} | 57 void UpdateTextInputState(const ui::TextInputState& state) override {} |
54 void SetImeVisibility(bool visible) override {} | 58 void SetImeVisibility(bool visible) override {} |
55 bool IsFramePending() const override { return false; } | 59 bool IsFramePending() const override { return false; } |
56 void RequestCopyOfOutput( | 60 void RequestCopyOfOutput( |
57 std::unique_ptr<cc::CopyOutputRequest> output_request) override {} | 61 std::unique_ptr<cc::CopyOutputRequest> output_request) override {} |
58 int64_t GetDisplayId() const override { return 1; } | 62 int64_t GetDisplayId() const override { return 1; } |
59 | 63 |
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 return nullptr; | 522 return nullptr; |
519 if (!tree->AddWindow(parent_client_id, client_window_id)) | 523 if (!tree->AddWindow(parent_client_id, client_window_id)) |
520 return nullptr; | 524 return nullptr; |
521 *client_id = client_window_id; | 525 *client_id = client_window_id; |
522 return tree->GetWindowByClientId(client_window_id); | 526 return tree->GetWindowByClientId(client_window_id); |
523 } | 527 } |
524 | 528 |
525 } // namespace test | 529 } // namespace test |
526 } // namespace ws | 530 } // namespace ws |
527 } // namespace ui | 531 } // namespace ui |
OLD | NEW |