| 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 "ui/aura/test/mus/window_tree_client_private.h" | 5 #include "ui/aura/test/mus/window_tree_client_private.h" |
| 6 | 6 |
| 7 #include "ui/aura/mus/window_port_mus.h" | 7 #include "ui/aura/mus/window_port_mus.h" |
| 8 #include "ui/aura/mus/window_tree_client.h" | 8 #include "ui/aura/mus/window_tree_client.h" |
| 9 #include "ui/aura/window.h" | 9 #include "ui/aura/window.h" |
| 10 #include "ui/display/display.h" | 10 #include "ui/display/display.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 Window* window, | 55 Window* window, |
| 56 std::unique_ptr<ui::Event> event) { | 56 std::unique_ptr<ui::Event> event) { |
| 57 const uint32_t event_id = 0u; | 57 const uint32_t event_id = 0u; |
| 58 const uint32_t observer_id = 0u; | 58 const uint32_t observer_id = 0u; |
| 59 const int64_t display_id = 0; | 59 const int64_t display_id = 0; |
| 60 tree_client_impl_->OnWindowInputEvent( | 60 tree_client_impl_->OnWindowInputEvent( |
| 61 event_id, WindowPortMus::Get(window)->server_id(), display_id, | 61 event_id, WindowPortMus::Get(window)->server_id(), display_id, |
| 62 std::move(event), observer_id); | 62 std::move(event), observer_id); |
| 63 } | 63 } |
| 64 | 64 |
| 65 void WindowTreeClientPrivate::CallOnPointerEventObserved( |
| 66 Window* window, |
| 67 std::unique_ptr<ui::Event> event) { |
| 68 const int64_t display_id = 0; |
| 69 const uint32_t window_id = |
| 70 window ? WindowPortMus::Get(window)->server_id() : 0u; |
| 71 tree_client_impl_->OnPointerEventObserved(std::move(event), window_id, |
| 72 display_id); |
| 73 } |
| 74 |
| 65 void WindowTreeClientPrivate::CallOnCaptureChanged(Window* new_capture, | 75 void WindowTreeClientPrivate::CallOnCaptureChanged(Window* new_capture, |
| 66 Window* old_capture) { | 76 Window* old_capture) { |
| 67 tree_client_impl_->OnCaptureChanged( | 77 tree_client_impl_->OnCaptureChanged( |
| 68 new_capture ? WindowPortMus::Get(new_capture)->server_id() : 0, | 78 new_capture ? WindowPortMus::Get(new_capture)->server_id() : 0, |
| 69 old_capture ? WindowPortMus::Get(old_capture)->server_id() : 0); | 79 old_capture ? WindowPortMus::Get(old_capture)->server_id() : 0); |
| 70 } | 80 } |
| 71 | 81 |
| 72 void WindowTreeClientPrivate::SetTreeAndClientId( | 82 void WindowTreeClientPrivate::SetTreeAndClientId( |
| 73 ui::mojom::WindowTree* window_tree, | 83 ui::mojom::WindowTree* window_tree, |
| 74 ClientSpecificId client_id) { | 84 ClientSpecificId client_id) { |
| 75 tree_client_impl_->WindowTreeConnectionEstablished(window_tree); | 85 tree_client_impl_->WindowTreeConnectionEstablished(window_tree); |
| 76 tree_client_impl_->client_id_ = client_id; | 86 tree_client_impl_->client_id_ = client_id; |
| 77 } | 87 } |
| 78 | 88 |
| 79 bool WindowTreeClientPrivate::HasPointerWatcher() { | 89 bool WindowTreeClientPrivate::HasPointerWatcher() { |
| 80 return tree_client_impl_->has_pointer_watcher_; | 90 return tree_client_impl_->has_pointer_watcher_; |
| 81 } | 91 } |
| 82 | 92 |
| 83 Window* WindowTreeClientPrivate::GetWindowByServerId(Id id) { | 93 Window* WindowTreeClientPrivate::GetWindowByServerId(Id id) { |
| 84 WindowMus* window = tree_client_impl_->GetWindowByServerId(id); | 94 WindowMus* window = tree_client_impl_->GetWindowByServerId(id); |
| 85 return window ? window->GetWindow() : nullptr; | 95 return window ? window->GetWindow() : nullptr; |
| 86 } | 96 } |
| 87 | 97 |
| 88 } // namespace aura | 98 } // namespace aura |
| OLD | NEW |