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

Side by Side Diff: content/browser/mojo/mojo_application_host.cc

Issue 1350023003: Add a Mojo EDK for Chrome that uses one OS pipe per message pipe. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/mojo/mojo_application_host.h" 5 #include "content/browser/mojo/mojo_application_host.h"
6 6
7 #include "content/common/mojo/mojo_messages.h" 7 #include "content/common/mojo/mojo_messages.h"
8 #include "content/public/browser/browser_thread.h" 8 #include "content/public/browser/browser_thread.h"
9 #include "ipc/ipc_sender.h" 9 #include "ipc/ipc_sender.h"
10
11 #if defined(USE_CHROME_EDK)
12 #include "mojo/edk/embedder/platform_channel_pair.h"
13 #else
10 #include "third_party/mojo/src/mojo/edk/embedder/platform_channel_pair.h" 14 #include "third_party/mojo/src/mojo/edk/embedder/platform_channel_pair.h"
15 #endif
11 16
12 namespace content { 17 namespace content {
13 namespace { 18 namespace {
14 19
15 base::PlatformFile PlatformFileFromScopedPlatformHandle( 20 base::PlatformFile PlatformFileFromScopedPlatformHandle(
16 mojo::embedder::ScopedPlatformHandle handle) { 21 mojo::embedder::ScopedPlatformHandle handle) {
17 #if defined(OS_POSIX) 22 #if defined(OS_POSIX)
18 return handle.release().fd; 23 return handle.release().fd;
19 #elif defined(OS_WIN) 24 #elif defined(OS_WIN)
20 return handle.release().handle; 25 return handle.release().handle;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 DCHECK_CURRENTLY_ON(BrowserThread::IO); 111 DCHECK_CURRENTLY_ON(BrowserThread::IO);
107 channel_init_.ShutdownOnIOThread(); 112 channel_init_.ShutdownOnIOThread();
108 } 113 }
109 114
110 void MojoApplicationHost::OverrideIOTaskRunnerForTest( 115 void MojoApplicationHost::OverrideIOTaskRunnerForTest(
111 scoped_refptr<base::TaskRunner> io_task_runner) { 116 scoped_refptr<base::TaskRunner> io_task_runner) {
112 io_task_runner_override_ = io_task_runner; 117 io_task_runner_override_ = io_task_runner;
113 } 118 }
114 119
115 } // namespace content 120 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698