Skip to content

Commit

Permalink
Merge pull request flutter#2406 from abarth/rm_service_registry
Browse files Browse the repository at this point in the history
Remove ServiceRegistry
  • Loading branch information
abarth committed Feb 19, 2016
2 parents 48bfd12 + 8111a77 commit b1eb676
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 14 deletions.
2 changes: 1 addition & 1 deletion sky/engine/bindings/mojo_services.cc
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ mojo::Handle MojoServices::TakeShellProxy() {
}

mojo::Handle MojoServices::TakeServiceRegistry() {
return services_ ? services_->service_registry.PassInterface().PassHandle().release() : mojo::Handle();
return mojo::Handle();
}

mojo::Handle MojoServices::TakeServicesProvidedByEmbedder() {
Expand Down
1 change: 0 additions & 1 deletion sky/services/engine/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ mojom("interfaces") {
"//mojo/public/interfaces/application",
"//mojo/services/asset_bundle/interfaces",
"//mojo/services/gfx/composition/interfaces",
"//mojo/services/service_registry/interfaces",
"//mojo/services/ui/views/interfaces",
"//sky/services/pointer:interfaces",
]
Expand Down
2 changes: 0 additions & 2 deletions sky/services/engine/sky_engine.mojom
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import "mojo/public/interfaces/application/service_provider.mojom";
import "mojo/public/interfaces/application/shell.mojom";
import "mojo/services/asset_bundle/interfaces/asset_bundle.mojom";
import "mojo/services/gfx/composition/interfaces/scheduling.mojom";
import "mojo/services/service_registry/interfaces/service_registry.mojom";
import "mojo/services/ui/views/interfaces/views.mojom";
import "sky/services/engine/input_event.mojom";
import "sky/services/pointer/pointer.mojom";
Expand All @@ -30,7 +29,6 @@ struct ViewportMetrics {

struct ServicesData {
mojo.Shell? shell;
mojo.ServiceRegistry? service_registry;
mojo.ServiceProvider? services_provided_by_embedder;
mojo.ServiceProvider&? services_provided_to_embedder;
mojo.ui.ViewHost? view_host;
Expand Down
1 change: 0 additions & 1 deletion sky/shell/platform/mojo/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ mojo_native_application("mojo") {
"//mojo/services/content_handler/interfaces",
"//mojo/services/gfx/composition/interfaces",
"//mojo/services/input_events/interfaces",
"//mojo/services/service_registry/interfaces",
"//mojo/services/ui/input/interfaces",
"//mojo/services/ui/views/interfaces",
"//services/asset_bundle:lib",
Expand Down
8 changes: 0 additions & 8 deletions sky/shell/platform/mojo/application_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,6 @@ void ApplicationImpl::AcceptConnection(
mojo::ServiceProviderPtr incoming_services,
const mojo::String& resolved_url) {
service_provider_bindings_.AddBinding(this, outgoing_services.Pass());

// It's unclear where we should get the service registry from. We currently
// get it from the first incomming application connection, which happens to
// work for our current use cases, but it's fragile and unsatifying. We'll
// probably need to re-think service registry once more of the system exists.
if (incoming_services && !initial_service_registry_)
mojo::ConnectToService(incoming_services.get(), &initial_service_registry_);
}

void ApplicationImpl::RequestQuit() {
Expand All @@ -74,7 +67,6 @@ void ApplicationImpl::CreateView(

ServicesDataPtr services = ServicesData::New();
services->shell = shell_.Pass();
services->service_registry = initial_service_registry_.Pass();
services->services_provided_by_embedder = incoming_services.Pass();
services->services_provided_to_embedder = outgoing_services.Pass();

Expand Down
1 change: 0 additions & 1 deletion sky/shell/platform/mojo/application_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ class ApplicationImpl : public mojo::Application,

mojo::StrongBinding<mojo::Application> binding_;
mojo::URLResponsePtr initial_response_;
mojo::ServiceRegistryPtr initial_service_registry_;
mojo::BindingSet<mojo::ServiceProvider> service_provider_bindings_;
mojo::BindingSet<mojo::ui::ViewProvider> view_provider_bindings_;
std::string url_;
Expand Down

0 comments on commit b1eb676

Please sign in to comment.