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

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: merge and fix new flaky test 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
« 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 12895d5c35336b261916132d8e37ab19838c7530..3cf38a7caaea9b08527c67156c4331909a8fc5cf 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,16 +85,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 = std::move(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