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

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

Issue 1554443003: Stop linking in the old Mojo EDK. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more fixes Created 4 years, 11 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: 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 12895d5c35336b261916132d8e37ab19838c7530..9887a5a93e80e9fe4d2043c70deb6327a48fa276 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,
@@ -63,7 +54,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_) {
@@ -75,7 +66,7 @@ bool MojoApplicationHost::Init() {
}
mojo::ScopedMessagePipeHandle message_pipe = channel_init_.Init(
- PlatformFileFromScopedPlatformHandle(channel_pair.PassServerHandle()),
+ channel_pair.PassServerHandle().release().handle,
io_task_runner);
if (!message_pipe.is_valid())
return false;
@@ -94,8 +85,7 @@ 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 = std::move(client_handle_).release().handle;
did_activate_ = sender->Send(new MojoMsg_Activate(
IPC::GetFileHandleForProcess(client_file, process_handle, true)));
}

Powered by Google App Engine
This is Rietveld 408576698