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

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

Issue 298653010: Change Shell / ShellClient to ServiceProvider (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Support content Mojo stuff Created 6 years, 7 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/shell/lib/service_connector.h b/mojo/public/cpp/application/lib/service_connector.h
similarity index 84%
rename from mojo/public/cpp/shell/lib/service_connector.h
rename to mojo/public/cpp/application/lib/service_connector.h
index 421cb7273d15ec8ffc2645efa46d0edfd29c037d..8dda3344fb6ebbe093f472261cebdb701f77b24d 100644
--- a/mojo/public/cpp/shell/lib/service_connector.h
+++ b/mojo/public/cpp/application/lib/service_connector.h
@@ -2,15 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef MOJO_PUBLIC_CPP_SHELL_LIB_SERVICE_CONNECTOR_H_
-#define MOJO_PUBLIC_CPP_SHELL_LIB_SERVICE_CONNECTOR_H_
+#ifndef MOJO_PUBLIC_CPP_APPLICATION_LIB_SERVICE_CONNECTOR_H_
+#define MOJO_PUBLIC_CPP_APPLICATION_LIB_SERVICE_CONNECTOR_H_
#include <assert.h>
#include <vector>
#include "mojo/public/cpp/bindings/allocation_scope.h"
-#include "mojo/public/interfaces/shell/shell.mojom.h"
+#include "mojo/public/interfaces/service_provider/service_provider.mojom.h"
namespace mojo {
namespace internal {
@@ -61,11 +61,11 @@ struct ServiceConstructor<ServiceImpl, void> {
class ServiceConnectorBase {
public:
- class Owner : public ShellClient {
+ class Owner : public ServiceProvider {
public:
- Owner(ScopedMessagePipeHandle shell_handle);
+ Owner(ScopedMessagePipeHandle service_provider_handle);
virtual ~Owner();
- Shell* shell() { return shell_.get(); }
+ ServiceProvider* service_provider() { return service_provider_.get(); }
virtual void AddServiceConnector(
internal::ServiceConnectorBase* service_connector) = 0;
virtual void RemoveServiceConnector(
@@ -76,12 +76,12 @@ class ServiceConnectorBase {
Owner* owner) {
service_connector->owner_ = owner;
}
- ShellPtr shell_;
+ ServiceProviderPtr service_provider_;
};
ServiceConnectorBase() : owner_(NULL) {}
virtual ~ServiceConnectorBase();
- Shell* shell() { return owner_->shell(); }
- virtual void AcceptConnection(const std::string& url,
+ ServiceProvider* service_provider() { return owner_->service_provider(); }
+ virtual void ConnectToService(const std::string& url,
ScopedMessagePipeHandle client_handle) = 0;
protected:
@@ -103,7 +103,7 @@ class ServiceConnector : public internal::ServiceConnectorBase {
assert(connections_.empty()); // No one should have added more!
}
- virtual void AcceptConnection(const std::string& url,
+ virtual void ConnectToService(const std::string& url,
ScopedMessagePipeHandle handle) MOJO_OVERRIDE {
ServiceConnection<ServiceImpl, Context>* impl =
ServiceConstructor<ServiceImpl, Context>::New(context_);
@@ -138,4 +138,4 @@ class ServiceConnector : public internal::ServiceConnectorBase {
} // namespace internal
} // namespace mojo
-#endif // MOJO_PUBLIC_CPP_SHELL_LIB_SERVICE_CONNECTOR_H_
+#endif // MOJO_PUBLIC_CPP_APPLICATION_LIB_SERVICE_CONNECTOR_H_

Powered by Google App Engine
This is Rietveld 408576698