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

Unified Diff: components/mus/public/cpp/lib/window_tree_client_impl.cc

Issue 1674903003: Extract shell methods from ApplicationImpl into a base class, and pass this to Initialize() instead. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojom
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
Index: components/mus/public/cpp/lib/window_tree_client_impl.cc
diff --git a/components/mus/public/cpp/lib/window_tree_client_impl.cc b/components/mus/public/cpp/lib/window_tree_client_impl.cc
index 93ad7723a16ba2ef2706d1ada7e0bc63a4c535f4..afda3498ac25909c0d4605cd73219e8b61865561 100644
--- a/components/mus/public/cpp/lib/window_tree_client_impl.cc
+++ b/components/mus/public/cpp/lib/window_tree_client_impl.cc
@@ -19,10 +19,7 @@
#include "components/mus/public/cpp/window_tree_connection_observer.h"
#include "components/mus/public/cpp/window_tree_delegate.h"
#include "mojo/converters/geometry/geometry_type_converters.h"
-#include "mojo/shell/public/cpp/application_impl.h"
-#include "mojo/shell/public/cpp/connect.h"
-#include "mojo/shell/public/cpp/service_provider_impl.h"
-#include "mojo/shell/public/interfaces/service_provider.mojom.h"
+#include "mojo/shell/public/cpp/shell.h"
#include "ui/gfx/geometry/insets.h"
#include "ui/gfx/geometry/size.h"
@@ -83,10 +80,10 @@ Window* BuildWindowTree(WindowTreeClientImpl* client,
}
WindowTreeConnection* WindowTreeConnection::Create(WindowTreeDelegate* delegate,
- mojo::ApplicationImpl* app) {
+ mojo::Shell* shell) {
WindowTreeClientImpl* client =
new WindowTreeClientImpl(delegate, nullptr, nullptr);
- client->ConnectViaWindowTreeFactory(app);
+ client->ConnectViaWindowTreeFactory(shell);
return client;
}
@@ -161,7 +158,7 @@ WindowTreeClientImpl::~WindowTreeClientImpl() {
}
void WindowTreeClientImpl::ConnectViaWindowTreeFactory(
- mojo::ApplicationImpl* app) {
+ mojo::Shell* shell) {
// Clients created with no root shouldn't delete automatically.
delete_on_no_roots_ = false;
@@ -169,7 +166,7 @@ void WindowTreeClientImpl::ConnectViaWindowTreeFactory(
connection_id_ = 101;
mojom::WindowTreeFactoryPtr factory;
- app->ConnectToService("mojo:mus", &factory);
+ shell->ConnectToService("mojo:mus", &factory);
factory->CreateWindowTree(GetProxy(&tree_ptr_),
binding_.CreateInterfacePtrAndBind());
tree_ = tree_ptr_.get();
« no previous file with comments | « components/mus/public/cpp/lib/window_tree_client_impl.h ('k') | components/mus/public/cpp/lib/window_tree_host_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698