Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2526)

Unified Diff: components/mus/public/cpp/tests/window_tree_client_private.cc

Issue 2072343002: Changes how window manager obtains WindowTree from mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: include Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/mus/public/cpp/tests/window_tree_client_private.cc
diff --git a/components/mus/public/cpp/tests/window_tree_client_private.cc b/components/mus/public/cpp/tests/window_tree_client_private.cc
index 3d2e2bd5e92dfc1d2bb52ca73348ca4057bbaf50..eafd2a611e1ddec976796a975a520e017b8fbdac 100644
--- a/components/mus/public/cpp/tests/window_tree_client_private.cc
+++ b/components/mus/public/cpp/tests/window_tree_client_private.cc
@@ -6,6 +6,7 @@
#include "components/mus/public/cpp/window.h"
#include "components/mus/public/cpp/window_tree_client.h"
+#include "ui/display/display.h"
namespace mus {
@@ -34,6 +35,19 @@ void WindowTreeClientPrivate::OnEmbed(mojom::WindowTree* window_tree) {
display_id, focused_window_id, true);
}
+void WindowTreeClientPrivate::CallWmNewDisplayAdded(
+ const display::Display& display) {
+ mojom::WindowDataPtr root_data(mojom::WindowData::New());
+ root_data->parent_id = 0;
+ root_data->window_id = 1;
+ 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);
+}
+
void WindowTreeClientPrivate::CallOnWindowInputEvent(
Window* window,
std::unique_ptr<ui::Event> event) {
@@ -43,4 +57,10 @@ void WindowTreeClientPrivate::CallOnWindowInputEvent(
std::move(event), observer_id);
}
+void WindowTreeClientPrivate::SetTreeAndClientId(mojom::WindowTree* window_tree,
+ ClientSpecificId client_id) {
+ tree_client_impl_->tree_ = window_tree;
+ tree_client_impl_->client_id_ = client_id;
+}
+
} // namespace mus
« no previous file with comments | « components/mus/public/cpp/tests/window_tree_client_private.h ('k') | components/mus/public/cpp/window_manager_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698