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

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

Issue 2118083002: ShellClient -> Service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mus2
Patch Set: . Created 4 years, 5 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/service.h ('k') | services/shell/public/cpp/shell_connection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/shell/public/cpp/shell_client.h
diff --git a/services/shell/public/cpp/shell_client.h b/services/shell/public/cpp/shell_client.h
deleted file mode 100644
index ac2091a083ec051942e0afd7c0dd728eafd0bf10..0000000000000000000000000000000000000000
--- a/services/shell/public/cpp/shell_client.h
+++ /dev/null
@@ -1,63 +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_SHELL_CLIENT_H_
-#define SERVICES_SHELL_PUBLIC_CPP_SHELL_CLIENT_H_
-
-#include <stdint.h>
-#include <string>
-
-#include "base/macros.h"
-#include "services/shell/public/cpp/connection.h"
-#include "services/shell/public/cpp/identity.h"
-
-namespace shell {
-
-class Connector;
-
-// An interface representing an instance "known to the Mojo Shell". The
-// implementation receives lifecycle messages for the instance and gets the
-// opportunity to handle inbound connections brokered by the Shell. Every client
-// of ShellConnection must implement this interface, and instances of this
-// interface must outlive the ShellConnection.
-class ShellClient {
- public:
- ShellClient();
- virtual ~ShellClient();
-
- // Called once a bidirectional connection with the shell has been established.
- // |identity| is the identity of the instance.
- // |id| is a unique identifier the shell uses to identify this specific
- // instance of the application.
- // Called exactly once before any other method.
- virtual void Initialize(Connector* connector,
- const Identity& identity,
- uint32_t id);
-
- virtual InterfaceProvider* GetInterfaceProviderForConnection();
- virtual InterfaceRegistry* GetInterfaceRegistryForConnection();
-
- // Called when a connection to this client is brokered by the shell. Override
- // to expose services to the remote application. 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 AcceptConnection(Connection* connection);
-
- // Called when ShellConnection's ShellClient binding (i.e. the pipe the
- // Mojo Shell has to talk to us over) is closed. A shell client may use this
- // as a signal to terminate. Return true from this method to tell the
- // ShellConnection 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 app
- // quitting.
- virtual bool ShellConnectionLost();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ShellClient);
-};
-
-} // namespace shell
-
-#endif // SERVICES_SHELL_PUBLIC_CPP_SHELL_CLIENT_H_
« no previous file with comments | « services/shell/public/cpp/service.h ('k') | services/shell/public/cpp/shell_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698