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

Unified Diff: mojo/shell/external_application_registrar_connection.h

Issue 775343004: Move //mojo/shell to //shell (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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/shell/external_application_registrar_connection.h
diff --git a/mojo/shell/external_application_registrar_connection.h b/mojo/shell/external_application_registrar_connection.h
deleted file mode 100644
index b86ff2e56c22a96eb89183575d3d684c4858b6d4..0000000000000000000000000000000000000000
--- a/mojo/shell/external_application_registrar_connection.h
+++ /dev/null
@@ -1,61 +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_SHELL_EXTERNAL_APPLICATION_REGISTRAR_CONNECTION_H_
-#define MOJO_SHELL_EXTERNAL_APPLICATION_REGISTRAR_CONNECTION_H_
-
-#include "base/callback_forward.h"
-#include "base/files/file_path.h"
-#include "base/memory/scoped_ptr.h"
-#include "mojo/common/common_type_converters.h"
-#include "mojo/edk/embedder/channel_init.h"
-#include "mojo/public/cpp/bindings/error_handler.h"
-#include "mojo/public/interfaces/application/application.mojom.h"
-#include "mojo/public/interfaces/application/shell.mojom.h"
-#include "mojo/shell/domain_socket/socket_descriptor.h"
-#include "mojo/shell/domain_socket/unix_domain_client_socket_posix.h"
-#include "mojo/shell/external_application_registrar.mojom.h"
-#include "url/gurl.h"
-
-namespace mojo {
-namespace shell {
-
-// Externally-running applications can use this class to discover and register
-// with a running mojo_shell instance.
-// MUST be run on an IO thread
-class ExternalApplicationRegistrarConnection : public ErrorHandler {
- public:
- // Configures client_socket_ to point at socket_path.
- explicit ExternalApplicationRegistrarConnection(
- const base::FilePath& socket_path);
- ~ExternalApplicationRegistrarConnection() override;
-
- // Implementation of ErrorHandler
- void OnConnectionError() override;
-
- // Connects client_socket_ and binds it to registrar_.
- // Status code is passed to callback upon success or failure.
- // May return either synchronously or asynchronously, depending on the
- // status of the underlying socket.
- void Connect(const CompletionCallback& callback);
-
- // Registers this app with the shell at the provided URL.
- void Register(const GURL& app_url,
- base::Callback<void(ShellPtr)> register_complete_callback);
-
- private:
- // Handles the result of Connect(). If it was successful, promotes the socket
- // to a MessagePipe and binds it to registrar_.
- // Hands rv to callback regardless.
- void OnConnect(CompletionCallback callback, int rv);
-
- scoped_ptr<UnixDomainClientSocket> client_socket_;
- mojo::embedder::ChannelInit channel_init_;
- ExternalApplicationRegistrarPtr registrar_;
-};
-
-} // namespace shell
-} // namespace mojo
-
-#endif // MOJO_SHELL_EXTERNAL_APPLICATION_REGISTRAR_CONNECTION_H_
« no previous file with comments | « mojo/shell/external_application_registrar.mojom ('k') | mojo/shell/external_application_registrar_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698