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

Unified Diff: components/core_services/core_services_application_delegate.h

Issue 1084463003: Start building core_services.mojo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add OWNERS files for directories. Created 5 years, 8 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/core_services/OWNERS ('k') | components/core_services/core_services_application_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/core_services/core_services_application_delegate.h
diff --git a/components/core_services/core_services_application_delegate.h b/components/core_services/core_services_application_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..2662e410bff08f6b1be9105ab3580b2ceab63609
--- /dev/null
+++ b/components/core_services/core_services_application_delegate.h
@@ -0,0 +1,47 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_CORE_SERVICES_APPLICATION_DELEGATE_H_
+#define COMPONENTS_CORE_SERVICES_APPLICATION_DELEGATE_H_
+
+#include "base/macros.h"
+#include "mojo/common/weak_binding_set.h"
+#include "third_party/mojo/src/mojo/public/cpp/application/application_delegate.h"
+#include "third_party/mojo/src/mojo/public/cpp/application/interface_factory_impl.h"
+#include "third_party/mojo/src/mojo/public/interfaces/application/service_provider.mojom.h"
+
+namespace core_services {
+
+// The CoreServices application is a singleton ServiceProvider. There is one
+// instance of the CoreServices ServiceProvider.
+class CoreServicesApplicationDelegate
+ : public mojo::ApplicationDelegate,
+ public mojo::InterfaceFactory<mojo::ServiceProvider>,
+ public mojo::ServiceProvider {
+ public:
+ CoreServicesApplicationDelegate();
+ ~CoreServicesApplicationDelegate() override;
+
+ private:
+ // Overridden from mojo::ApplicationDelegate:
+ bool ConfigureIncomingConnection(
+ mojo::ApplicationConnection* connection) override;
+
+ // Overridden from mojo::InterfaceFactory<ServiceProvider>:
+ void Create(mojo::ApplicationConnection* connection,
+ mojo::InterfaceRequest<ServiceProvider> request) override;
+
+ // Overridden from ServiceProvider:
+ void ConnectToService(const mojo::String& service_name,
+ mojo::ScopedMessagePipeHandle client_handle) override;
+
+ // Bindings for all of our connections.
+ mojo::WeakBindingSet<ServiceProvider> provider_bindings_;
+
+ DISALLOW_COPY_AND_ASSIGN(CoreServicesApplicationDelegate);
+};
+
+} // namespace core_services
+
+#endif // COMPONENTS_CORE_SERVICES_APPLICATION_DELEGATE_H_
« no previous file with comments | « components/core_services/OWNERS ('k') | components/core_services/core_services_application_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698