Index: ui/aura/test/mus/window_tree_client_private.cc |
diff --git a/services/ui/public/cpp/tests/window_tree_client_private.cc b/ui/aura/test/mus/window_tree_client_private.cc |
similarity index 60% |
copy from services/ui/public/cpp/tests/window_tree_client_private.cc |
copy to ui/aura/test/mus/window_tree_client_private.cc |
index 77c802048f689841039408845b22ff4e6d141d81..666ae69b6102194524dd36a6b516f8045fc70266 100644 |
--- a/services/ui/public/cpp/tests/window_tree_client_private.cc |
+++ b/ui/aura/test/mus/window_tree_client_private.cc |
@@ -2,26 +2,27 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "services/ui/public/cpp/tests/window_tree_client_private.h" |
+#include "ui/aura/test/mus/window_tree_client_private.h" |
-#include "services/ui/public/cpp/window.h" |
-#include "services/ui/public/cpp/window_private.h" |
-#include "services/ui/public/cpp/window_tree_client.h" |
+#include "ui/aura/mus/window_port_mus.h" |
+#include "ui/aura/mus/window_tree_client.h" |
+#include "ui/aura/window.h" |
#include "ui/display/display.h" |
-namespace ui { |
+namespace aura { |
WindowTreeClientPrivate::WindowTreeClientPrivate( |
WindowTreeClient* tree_client_impl) |
: tree_client_impl_(tree_client_impl) {} |
WindowTreeClientPrivate::WindowTreeClientPrivate(Window* window) |
- : WindowTreeClientPrivate(window->window_tree()) {} |
+ : WindowTreeClientPrivate(WindowPortMus::Get(window)->window_tree_client_) { |
+} |
WindowTreeClientPrivate::~WindowTreeClientPrivate() {} |
-void WindowTreeClientPrivate::OnEmbed(mojom::WindowTree* window_tree) { |
- mojom::WindowDataPtr root_data(mojom::WindowData::New()); |
+void WindowTreeClientPrivate::OnEmbed(ui::mojom::WindowTree* window_tree) { |
+ ui::mojom::WindowDataPtr root_data(ui::mojom::WindowData::New()); |
root_data->parent_id = 0; |
root_data->window_id = next_window_id_++; |
root_data->properties.SetToEmpty(); |
@@ -32,17 +33,17 @@ void WindowTreeClientPrivate::OnEmbed(mojom::WindowTree* window_tree) { |
display_id, focused_window_id, true); |
} |
-void WindowTreeClientPrivate::CallWmNewDisplayAdded( |
+WindowTreeHost* WindowTreeClientPrivate::CallWmNewDisplayAdded( |
const display::Display& display) { |
- mojom::WindowDataPtr root_data(mojom::WindowData::New()); |
+ ui::mojom::WindowDataPtr root_data(ui::mojom::WindowData::New()); |
root_data->parent_id = 0; |
root_data->window_id = next_window_id_++; |
root_data->properties.SetToEmpty(); |
root_data->visible = true; |
root_data->bounds = gfx::Rect(display.bounds().size()); |
const bool parent_drawn = true; |
- tree_client_impl_->WmNewDisplayAddedImpl(display, std::move(root_data), |
- parent_drawn); |
+ return tree_client_impl_->WmNewDisplayAddedImpl(display, std::move(root_data), |
+ parent_drawn); |
} |
void WindowTreeClientPrivate::CallOnWindowInputEvent( |
@@ -50,19 +51,21 @@ void WindowTreeClientPrivate::CallOnWindowInputEvent( |
std::unique_ptr<ui::Event> event) { |
const uint32_t event_id = 0u; |
const uint32_t observer_id = 0u; |
- tree_client_impl_->OnWindowInputEvent(event_id, window->server_id(), |
+ tree_client_impl_->OnWindowInputEvent(event_id, |
+ WindowPortMus::Get(window)->server_id(), |
std::move(event), observer_id); |
} |
void WindowTreeClientPrivate::CallOnCaptureChanged(Window* new_capture, |
Window* old_capture) { |
tree_client_impl_->OnCaptureChanged( |
- new_capture ? WindowPrivate(new_capture).server_id() : 0, |
- old_capture ? WindowPrivate(old_capture).server_id() : 0); |
+ new_capture ? WindowPortMus::Get(new_capture)->server_id() : 0, |
+ old_capture ? WindowPortMus::Get(old_capture)->server_id() : 0); |
} |
-void WindowTreeClientPrivate::SetTreeAndClientId(mojom::WindowTree* window_tree, |
- ClientSpecificId client_id) { |
+void WindowTreeClientPrivate::SetTreeAndClientId( |
+ ui::mojom::WindowTree* window_tree, |
+ ClientSpecificId client_id) { |
tree_client_impl_->tree_ = window_tree; |
tree_client_impl_->client_id_ = client_id; |
} |
@@ -71,4 +74,4 @@ bool WindowTreeClientPrivate::HasPointerWatcher() { |
return tree_client_impl_->has_pointer_watcher_; |
} |
-} // namespace ui |
+} // namespace aura |