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/public/cpp/tests/window_tree_client_private.h" | 5 #include "services/ui/public/cpp/tests/window_tree_client_private.h" |
6 | 6 |
7 #include "services/ui/public/cpp/window.h" | 7 #include "services/ui/public/cpp/window.h" |
8 #include "services/ui/public/cpp/window_tree_client.h" | 8 #include "services/ui/public/cpp/window_tree_client.h" |
9 #include "ui/display/display.h" | 9 #include "ui/display/display.h" |
10 | 10 |
11 namespace ui { | 11 namespace ui { |
12 | 12 |
13 WindowTreeClientPrivate::WindowTreeClientPrivate( | 13 WindowTreeClientPrivate::WindowTreeClientPrivate( |
14 WindowTreeClient* tree_client_impl) | 14 WindowTreeClient* tree_client_impl) |
15 : tree_client_impl_(tree_client_impl) {} | 15 : tree_client_impl_(tree_client_impl) {} |
16 | 16 |
17 WindowTreeClientPrivate::WindowTreeClientPrivate(Window* window) | 17 WindowTreeClientPrivate::WindowTreeClientPrivate(Window* window) |
18 : WindowTreeClientPrivate(window->window_tree()) {} | 18 : WindowTreeClientPrivate(window->window_tree()) {} |
19 | 19 |
20 WindowTreeClientPrivate::~WindowTreeClientPrivate() {} | 20 WindowTreeClientPrivate::~WindowTreeClientPrivate() {} |
21 | 21 |
| 22 // JAMES rename this |
22 uint32_t WindowTreeClientPrivate::event_observer_id() { | 23 uint32_t WindowTreeClientPrivate::event_observer_id() { |
23 return tree_client_impl_->event_observer_id_; | 24 return tree_client_impl_->pointer_watcher_id_; |
24 } | 25 } |
25 | 26 |
26 void WindowTreeClientPrivate::OnEmbed(mojom::WindowTree* window_tree) { | 27 void WindowTreeClientPrivate::OnEmbed(mojom::WindowTree* window_tree) { |
27 mojom::WindowDataPtr root_data(mojom::WindowData::New()); | 28 mojom::WindowDataPtr root_data(mojom::WindowData::New()); |
28 root_data->parent_id = 0; | 29 root_data->parent_id = 0; |
29 root_data->window_id = 1; | 30 root_data->window_id = 1; |
30 root_data->properties.SetToEmpty(); | 31 root_data->properties.SetToEmpty(); |
31 root_data->visible = true; | 32 root_data->visible = true; |
32 const int64_t display_id = 1; | 33 const int64_t display_id = 1; |
33 const Id focused_window_id = 0; | 34 const Id focused_window_id = 0; |
(...skipping 23 matching lines...) Expand all Loading... |
57 std::move(event), observer_id); | 58 std::move(event), observer_id); |
58 } | 59 } |
59 | 60 |
60 void WindowTreeClientPrivate::SetTreeAndClientId(mojom::WindowTree* window_tree, | 61 void WindowTreeClientPrivate::SetTreeAndClientId(mojom::WindowTree* window_tree, |
61 ClientSpecificId client_id) { | 62 ClientSpecificId client_id) { |
62 tree_client_impl_->tree_ = window_tree; | 63 tree_client_impl_->tree_ = window_tree; |
63 tree_client_impl_->client_id_ = client_id; | 64 tree_client_impl_->client_id_ = client_id; |
64 } | 65 } |
65 | 66 |
66 } // namespace ui | 67 } // namespace ui |
OLD | NEW |