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

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 76e1564a7602684b7955d2a2c03534a08d107d54..dfca4597fcfac5dc34affe88bd815b7bf10b1dd2 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"
@@ -20,7 +20,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) {}
@@ -44,12 +44,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_);
@@ -59,8 +57,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.
}
@@ -80,7 +77,7 @@ class TestWM : public shell::ShellClient,
}
mus::Window* OnWmCreateTopLevelWindow(
std::map<std::string, std::vector<uint8_t>>* properties) override {
- mus::Window* window = root_->connection()->NewWindow(properties);
+ mus::Window* window = root_->window_tree()->NewWindow(properties);
window->SetBounds(gfx::Rect(10, 10, 500, 500));
root_->AddChild(window);
return window;
« no previous file with comments | « components/mus/public/cpp/window_tree_host_factory.h ('k') | components/mus/ws/window_manager_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698