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

Unified Diff: components/mus/ws/window_tree_unittest.cc

Issue 1764483003: Changes ownership of ClientConnection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « components/mus/ws/window_tree_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/ws/window_tree_unittest.cc
diff --git a/components/mus/ws/window_tree_unittest.cc b/components/mus/ws/window_tree_unittest.cc
index b71174776025f9bbec8a265a32bfa5b69a42d7f4..edc15467415b7105fa98ba51fe16f44cdad106cb 100644
--- a/components/mus/ws/window_tree_unittest.cc
+++ b/components/mus/ws/window_tree_unittest.cc
@@ -218,9 +218,8 @@ class TestWindowTreeClient : public mus::mojom::WindowTreeClient {
// ClientConnection implementation that vends TestWindowTreeClient.
class TestClientConnection : public ClientConnection {
public:
- explicit TestClientConnection(scoped_ptr<WindowTreeImpl> service_impl)
- : ClientConnection(std::move(service_impl), &client_),
- is_paused_(false) {}
+ TestClientConnection() : ClientConnection(&client_), is_paused_(false) {}
+ ~TestClientConnection() override {}
TestWindowTreeClient* client() { return &client_; }
@@ -236,8 +235,6 @@ class TestClientConnection : public ClientConnection {
}
private:
- ~TestClientConnection() override {}
-
TestWindowTreeClient client_;
bool is_paused_;
@@ -261,25 +258,14 @@ class TestConnectionManagerDelegate : public ConnectionManagerDelegate {
private:
// ConnectionManagerDelegate:
void OnNoMoreRootConnections() override {}
- ClientConnection* CreateClientConnectionForEmbedAtWindow(
- ConnectionManager* connection_manager,
- mojo::InterfaceRequest<mus::mojom::WindowTree> service_request,
- ServerWindow* root,
- uint32_t policy_bitmask,
- mus::mojom::WindowTreeClientPtr client) override {
- scoped_ptr<WindowTreeImpl> service(
- new WindowTreeImpl(connection_manager, root, policy_bitmask));
- last_connection_ = new TestClientConnection(std::move(service));
- return last_connection_;
- }
- ClientConnection* CreateClientConnectionForWindowManager(
- WindowTreeHostImpl* tree_host,
- ServerWindow* window,
- const mojom::Display& display,
- uint32_t user_id,
- mojom::WindowManagerFactory* factory) override {
- NOTREACHED();
- return nullptr;
+ scoped_ptr<ClientConnection> CreateClientConnectionForEmbedAtWindow(
+ ws::ConnectionManager* connection_manager,
+ ws::WindowTreeImpl* tree,
+ mojom::WindowTreeRequest tree_request,
+ mojom::WindowTreeClientPtr client) override {
+ scoped_ptr<TestClientConnection> connection(new TestClientConnection);
+ last_connection_ = connection.get();
+ return std::move(connection);
}
void CreateDefaultWindowTreeHosts() override { NOTREACHED(); }
« no previous file with comments | « components/mus/ws/window_tree_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698