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

Unified Diff: mojo/shell/child_process.h

Issue 1065433002: Simplify some mojo_shell code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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/shell/child_process.h
diff --git a/mojo/shell/child_process.h b/mojo/shell/child_process.h
index 3da1c8fa2e89d495cd8a6f9188ac368b0ec98a0a..c0cc431aeb6929bb009adb61d3991f4cc2f1e5e4 100644
--- a/mojo/shell/child_process.h
+++ b/mojo/shell/child_process.h
@@ -2,50 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef SHELL_CHILD_PROCESS_H_
-#define SHELL_CHILD_PROCESS_H_
-
-#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
-#include "mojo/edk/embedder/scoped_platform_handle.h"
-
-namespace base {
-class CommandLine;
-}
+#ifndef MOJO_SHELL_CHILD_PROCESS_H_
+#define MOJO_SHELL_CHILD_PROCESS_H_
namespace mojo {
namespace shell {
-// A base class for child processes -- i.e., code that is actually run within
-// the child process. (Instances are manufactured by |Create()|.)
-class ChildProcess {
- public:
- virtual ~ChildProcess();
-
- // Returns null if the command line doesn't indicate that this is a child
- // process. |main()| should call this, and if it returns non-null it should
- // call |Main()| (without a message loop on the current thread).
- static scoped_ptr<ChildProcess> Create(const base::CommandLine& command_line);
-
- // To be implemented by subclasses. This is the "entrypoint" for a child
- // process. Run with no message loop for the main thread.
- virtual void Main() = 0;
-
- protected:
- ChildProcess();
-
- embedder::ScopedPlatformHandle* platform_channel() {
- return &platform_channel_;
- }
-
- private:
- // Available in |Main()| (after a successful |Create()|).
- embedder::ScopedPlatformHandle platform_channel_;
-
- DISALLOW_COPY_AND_ASSIGN(ChildProcess);
-};
+// Main method for a child process.
+int ChildProcessMain();
} // namespace shell
} // namespace mojo
-#endif // SHELL_CHILD_PROCESS_H_
+#endif // MOJO_SHELL_CHILD_PROCESS_H_

Powered by Google App Engine
This is Rietveld 408576698