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

Unified Diff: services/shell/public/cpp/service.h

Issue 2419723002: Move services/shell to services/service_manager (Closed)
Patch Set: rebase Created 4 years, 2 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 | « services/shell/public/cpp/names.h ('k') | services/shell/public/cpp/service.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/shell/public/cpp/service.h
diff --git a/services/shell/public/cpp/service.h b/services/shell/public/cpp/service.h
deleted file mode 100644
index e84ebd26233b62f7dcfc5813d2bf320fff58e37c..0000000000000000000000000000000000000000
--- a/services/shell/public/cpp/service.h
+++ /dev/null
@@ -1,68 +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 SERVICES_SHELL_PUBLIC_CPP_SERVICE_H_
-#define SERVICES_SHELL_PUBLIC_CPP_SERVICE_H_
-
-#include <stdint.h>
-#include <string>
-
-#include "base/macros.h"
-#include "services/shell/public/cpp/interface_registry.h"
-
-namespace shell {
-
-class Connector;
-class Identity;
-class InterfaceRegistry;
-class ServiceContext;
-
-// The primary contract between a Service and the Service Manager, receiving
-// lifecycle notifications and connection requests.
-class Service {
- public:
- Service();
- virtual ~Service();
-
- // Called once a bidirectional connection with the Service Manager has been
- // established.
- // |identity| is the identity of the service instance.
- // Called exactly once before any calls to OnConnect().
- virtual void OnStart(const Identity& identity);
-
- // Called when a connection to this service is brokered by the Service
- // Manager. Override to expose interfaces to the remote service. Return true
- // if the connection should succeed. Return false if the connection should
- // be rejected and the underlying pipe closed. The default implementation
- // returns false.
- virtual bool OnConnect(const Identity& remote_identity,
- InterfaceRegistry* registry);
-
- // Called when the Service Manager has stopped tracking this instance. The
- // service should use this as a signal to exit, and in fact its process may
- // be reaped shortly afterward.
- // Return true from this method to tell the ServiceContext to run its
- // connection lost closure if it has one, false to prevent it from being run.
- // The default implementation returns true.
- // When used in conjunction with ApplicationRunner, returning true here quits
- // the message loop created by ApplicationRunner, which results in the service
- // quitting.
- // No calls to either OnStart() nor OnConnect() may be received after this is
- // called. It is however possible for this to be called without OnStart() ever
- // having been called.
- virtual bool OnStop();
-
- Connector* connector();
- ServiceContext* context();
- void set_context(std::unique_ptr<ServiceContext> context);
-
- private:
- std::unique_ptr<ServiceContext> context_;
-
- DISALLOW_COPY_AND_ASSIGN(Service);
-};
-
-} // namespace shell
-
-#endif // SERVICES_SHELL_PUBLIC_CPP_SERVICE_H_
« no previous file with comments | « services/shell/public/cpp/names.h ('k') | services/shell/public/cpp/service.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698