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

Unified Diff: content/browser/mojo/mojo_application_host.cc

Issue 1676913002: [mojo] Delete third_party/mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: let's try that again Created 4 years, 10 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 | « content/browser/mojo/mojo_application_host.h ('k') | content/browser/mojo/mojo_shell_client_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/mojo/mojo_application_host.cc
diff --git a/content/browser/mojo/mojo_application_host.cc b/content/browser/mojo/mojo_application_host.cc
index cc2c74ac17471faf9567b024056f51fcebfc6276..1c3ed3732ab9aaf20db5822e6afeec08dab074ee 100644
--- a/content/browser/mojo/mojo_application_host.cc
+++ b/content/browser/mojo/mojo_application_host.cc
@@ -10,20 +10,11 @@
#include "content/common/mojo/mojo_messages.h"
#include "content/public/browser/browser_thread.h"
#include "ipc/ipc_sender.h"
-#include "third_party/mojo/src/mojo/edk/embedder/platform_channel_pair.h"
+#include "mojo/edk/embedder/platform_channel_pair.h"
namespace content {
namespace {
-base::PlatformFile PlatformFileFromScopedPlatformHandle(
- mojo::embedder::ScopedPlatformHandle handle) {
-#if defined(OS_POSIX)
- return handle.release().fd;
-#elif defined(OS_WIN)
- return handle.release().handle;
-#endif
-}
-
class ApplicationSetupImpl : public ApplicationSetup {
public:
ApplicationSetupImpl(ServiceRegistryImpl* service_registry,
@@ -62,7 +53,7 @@ MojoApplicationHost::~MojoApplicationHost() {
bool MojoApplicationHost::Init() {
DCHECK(!client_handle_.is_valid()) << "Already initialized!";
- mojo::embedder::PlatformChannelPair channel_pair;
+ mojo::edk::PlatformChannelPair channel_pair;
scoped_refptr<base::TaskRunner> io_task_runner;
if (io_task_runner_override_) {
@@ -76,8 +67,7 @@ bool MojoApplicationHost::Init() {
// Forward this to the client once we know its process handle.
client_handle_ = channel_pair.PassClientHandle();
mojo::ScopedMessagePipeHandle pipe = channel_init_.Init(
- PlatformFileFromScopedPlatformHandle(channel_pair.PassServerHandle()),
- io_task_runner);
+ channel_pair.PassServerHandle().release().handle, io_task_runner);
application_setup_.reset(new ApplicationSetupImpl(
&service_registry_,
mojo::MakeRequest<ApplicationSetup>(std::move(pipe))));
@@ -89,16 +79,11 @@ void MojoApplicationHost::Activate(IPC::Sender* sender,
DCHECK(!did_activate_);
DCHECK(client_handle_.is_valid());
- base::PlatformFile client_file =
- PlatformFileFromScopedPlatformHandle(std::move(client_handle_));
+ base::PlatformFile client_file = client_handle_.release().handle;
did_activate_ = sender->Send(new MojoMsg_Activate(
IPC::GetFileHandleForProcess(client_file, process_handle, true)));
}
-void MojoApplicationHost::WillDestroySoon() {
- channel_init_.WillDestroySoon();
-}
-
void MojoApplicationHost::OverrideIOTaskRunnerForTest(
scoped_refptr<base::TaskRunner> io_task_runner) {
io_task_runner_override_ = io_task_runner;
« no previous file with comments | « content/browser/mojo/mojo_application_host.h ('k') | content/browser/mojo/mojo_shell_client_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698