| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "components/mus/public/cpp/tests/window_tree_client_impl_private.h" |
| 6 |
| 7 #include "components/mus/public/cpp/lib/window_tree_client_impl.h" |
| 8 #include "mojo/converters/geometry/geometry_type_converters.h" |
| 9 |
| 10 namespace mus { |
| 11 |
| 12 WindowTreeClientImplPrivate::WindowTreeClientImplPrivate( |
| 13 WindowTreeClientImpl* tree_client_impl) |
| 14 : tree_client_impl_(tree_client_impl) {} |
| 15 |
| 16 WindowTreeClientImplPrivate::~WindowTreeClientImplPrivate() {} |
| 17 |
| 18 uint32_t WindowTreeClientImplPrivate::event_observer_id() { |
| 19 return tree_client_impl_->event_observer_id_; |
| 20 } |
| 21 |
| 22 void WindowTreeClientImplPrivate::OnEmbed(mojom::WindowTree* window_tree) { |
| 23 mojom::WindowDataPtr root_data(mojom::WindowData::New()); |
| 24 root_data->parent_id = 0; |
| 25 root_data->window_id = 1; |
| 26 root_data->bounds = mojo::Rect::From(gfx::Rect()); |
| 27 root_data->properties.SetToEmpty(); |
| 28 root_data->visible = true; |
| 29 root_data->viewport_metrics = mojom::ViewportMetrics::New(); |
| 30 root_data->viewport_metrics->size_in_pixels = |
| 31 mojo::Size::From(gfx::Size(1000, 1000)); |
| 32 root_data->viewport_metrics->device_pixel_ratio = 1; |
| 33 tree_client_impl_->OnEmbedImpl(window_tree, 1, std::move(root_data), 0, true); |
| 34 } |
| 35 |
| 36 } // namespace mus |
| OLD | NEW |