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

Unified Diff: components/mus/test_wm/test_wm.cc

Issue 2018823002: Eliminate WindowTreeConnection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@connection
Patch Set: . Created 4 years, 7 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/test_wm/test_wm.cc
diff --git a/components/mus/test_wm/test_wm.cc b/components/mus/test_wm/test_wm.cc
index 1a0b603746f05c1eef4854c63367b4bb3c6b1eba..dd4dd41c9c0ffc2bbd74fcfcb97c82faaed9967d 100644
--- a/components/mus/test_wm/test_wm.cc
+++ b/components/mus/test_wm/test_wm.cc
@@ -4,8 +4,8 @@
#include "components/mus/public/cpp/window.h"
#include "components/mus/public/cpp/window_manager_delegate.h"
-#include "components/mus/public/cpp/window_tree_connection.h"
-#include "components/mus/public/cpp/window_tree_delegate.h"
+#include "components/mus/public/cpp/window_tree_client.h"
+#include "components/mus/public/cpp/window_tree_client_delegate.h"
#include "components/mus/public/interfaces/window_manager_factory.mojom.h"
#include "mojo/public/c/system/main.h"
#include "mojo/public/cpp/bindings/binding.h"
@@ -21,7 +21,7 @@ namespace test {
class TestWM : public shell::ShellClient,
public mus::mojom::WindowManagerFactory,
- public mus::WindowTreeDelegate,
+ public mus::WindowTreeClientDelegate,
public mus::WindowManagerDelegate {
public:
TestWM() : window_manager_factory_binding_(this) {}
@@ -45,12 +45,10 @@ class TestWM : public shell::ShellClient,
void CreateWindowManager(
mus::mojom::DisplayPtr display,
mus::mojom::WindowTreeClientRequest request) override {
- mus::WindowTreeConnection::CreateForWindowManager(
- this, std::move(request),
- mus::WindowTreeConnection::CreateType::DONT_WAIT_FOR_EMBED, this);
+ new mus::WindowTreeClient(this, this, std::move(request));
}
- // mus::WindowTreeDelegate:
+ // mus::WindowTreeClientDelegate:
void OnEmbed(mus::Window* root) override {
root_ = root;
window_manager_client_->AddActivationParent(root_);
@@ -64,8 +62,7 @@ class TestWM : public shell::ShellClient,
window_manager_client_->SetFrameDecorationValues(
std::move(frame_decoration_values));
}
- void OnConnectionLost(mus::WindowTreeConnection* connection) override {
- }
+ void OnWindowTreeClientDestroyed(mus::WindowTreeClient* client) override {}
void OnEventObserved(const ui::Event& event, mus::Window* target) override {
// Don't care.
}

Powered by Google App Engine
This is Rietveld 408576698