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

Unified Diff: mojo/shell/runner/child/test_native_main.cc

Issue 1877753003: Move mojo\shell to services\shell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@62scan
Patch Set: . Created 4 years, 8 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 | « mojo/shell/runner/child/test_native_main.h ('k') | mojo/shell/runner/child/test_native_service.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/runner/child/test_native_main.cc
diff --git a/mojo/shell/runner/child/test_native_main.cc b/mojo/shell/runner/child/test_native_main.cc
deleted file mode 100644
index cc542158872395188e27555daef8429e15307a5b..0000000000000000000000000000000000000000
--- a/mojo/shell/runner/child/test_native_main.cc
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright 2015 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.
-
-#include "mojo/shell/runner/child/test_native_main.h"
-
-#include <utility>
-
-#include "base/debug/stack_trace.h"
-#include "base/macros.h"
-#include "base/message_loop/message_loop.h"
-#include "base/process/launch.h"
-#include "base/threading/thread.h"
-#include "build/build_config.h"
-#include "mojo/edk/embedder/embedder.h"
-#include "mojo/edk/embedder/process_delegate.h"
-#include "mojo/shell/public/cpp/shell_client.h"
-#include "mojo/shell/public/cpp/shell_connection.h"
-#include "mojo/shell/runner/common/client_util.h"
-#include "mojo/shell/runner/init.h"
-
-namespace mojo {
-namespace shell {
-namespace {
-
-class ProcessDelegate : public mojo::edk::ProcessDelegate {
- public:
- ProcessDelegate() {}
- ~ProcessDelegate() override {}
-
- private:
- void OnShutdownComplete() override {}
-
- DISALLOW_COPY_AND_ASSIGN(ProcessDelegate);
-};
-
-} // namespace
-
-int TestNativeMain(mojo::ShellClient* shell_client) {
- mojo::shell::WaitForDebuggerIfNecessary();
-
-#if !defined(OFFICIAL_BUILD)
- base::debug::EnableInProcessStackDumping();
-#if defined(OS_WIN)
- base::RouteStdioToConsole(false);
-#endif
-#endif
-
- {
- mojo::edk::Init();
-
- ProcessDelegate process_delegate;
- base::Thread io_thread("io_thread");
- base::Thread::Options io_thread_options(base::MessageLoop::TYPE_IO, 0);
- CHECK(io_thread.StartWithOptions(io_thread_options));
-
- mojo::edk::InitIPCSupport(&process_delegate, io_thread.task_runner());
- mojo::edk::SetParentPipeHandleFromCommandLine();
-
- base::MessageLoop loop;
- mojo::ShellConnection impl(
- shell_client, mojo::shell::GetShellClientRequestFromCommandLine());
- loop.Run();
-
- mojo::edk::ShutdownIPCSupport();
- }
-
- return 0;
-}
-
-} // namespace shell
-} // namespace mojo
« no previous file with comments | « mojo/shell/runner/child/test_native_main.h ('k') | mojo/shell/runner/child/test_native_service.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698