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

Unified Diff: mojo/public/cpp/application/lib/service_connector.h

Issue 814543006: Move //mojo/{public, edk} underneath //third_party (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 11 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: mojo/public/cpp/application/lib/service_connector.h
diff --git a/mojo/public/cpp/application/lib/service_connector.h b/mojo/public/cpp/application/lib/service_connector.h
deleted file mode 100644
index 70c13809525bea6e368029a199a36c4b1e1fd553..0000000000000000000000000000000000000000
--- a/mojo/public/cpp/application/lib/service_connector.h
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright 2014 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 MOJO_PUBLIC_CPP_APPLICATION_LIB_SERVICE_CONNECTOR_H_
-#define MOJO_PUBLIC_CPP_APPLICATION_LIB_SERVICE_CONNECTOR_H_
-
-#include "mojo/public/cpp/application/interface_factory.h"
-#include "mojo/public/cpp/bindings/interface_request.h"
-
-namespace mojo {
-class ApplicationConnection;
-
-namespace internal {
-
-class ServiceConnectorBase {
- public:
- ServiceConnectorBase(const std::string& name);
- virtual ~ServiceConnectorBase();
- virtual void ConnectToService(const std::string& name,
- ScopedMessagePipeHandle client_handle) = 0;
- std::string name() const { return name_; }
- void set_application_connection(ApplicationConnection* connection) {
- application_connection_ = connection;
- }
-
- protected:
- std::string name_;
- ApplicationConnection* application_connection_;
-
- MOJO_DISALLOW_COPY_AND_ASSIGN(ServiceConnectorBase);
-};
-
-template <typename Interface>
-class InterfaceFactoryConnector : public ServiceConnectorBase {
- public:
- explicit InterfaceFactoryConnector(InterfaceFactory<Interface>* factory)
- : ServiceConnectorBase(Interface::Name_), factory_(factory) {}
- virtual ~InterfaceFactoryConnector() {}
-
- virtual void ConnectToService(const std::string& name,
- ScopedMessagePipeHandle client_handle) {
- factory_->Create(application_connection_,
- MakeRequest<Interface>(client_handle.Pass()));
- }
-
- private:
- InterfaceFactory<Interface>* factory_;
- MOJO_DISALLOW_COPY_AND_ASSIGN(InterfaceFactoryConnector);
-};
-
-} // namespace internal
-} // namespace mojo
-
-#endif // MOJO_PUBLIC_CPP_APPLICATION_LIB_SERVICE_CONNECTOR_H_
« no previous file with comments | « mojo/public/cpp/application/lib/application_test_main.cc ('k') | mojo/public/cpp/application/lib/service_connector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698