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

Side by Side Diff: ipc/mojo/scoped_ipc_support.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "ipc/mojo/scoped_ipc_support.h" 5 #include "ipc/mojo/scoped_ipc_support.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
11 #include "base/synchronization/condition_variable.h" 11 #include "base/synchronization/condition_variable.h"
12 #include "base/synchronization/lock.h" 12 #include "base/synchronization/lock.h"
13 #include "base/synchronization/waitable_event.h" 13 #include "base/synchronization/waitable_event.h"
14 #include "base/thread_task_runner_handle.h" 14 #include "base/thread_task_runner_handle.h"
15
16 #if defined(USE_CHROME_EDK)
17 #include "mojo/edk/embedder/embedder.h"
18 #include "mojo/edk/embedder/process_delegate.h"
19 #else
15 #include "third_party/mojo/src/mojo/edk/embedder/embedder.h" 20 #include "third_party/mojo/src/mojo/edk/embedder/embedder.h"
16 #include "third_party/mojo/src/mojo/edk/embedder/process_delegate.h" 21 #include "third_party/mojo/src/mojo/edk/embedder/process_delegate.h"
22 #endif
17 23
18 namespace IPC { 24 namespace IPC {
19 25
20 namespace { 26 namespace {
21 27
22 class IPCSupportInitializer : public mojo::embedder::ProcessDelegate { 28 class IPCSupportInitializer : public mojo::embedder::ProcessDelegate {
23 public: 29 public:
24 IPCSupportInitializer() 30 IPCSupportInitializer()
25 : init_count_(0), 31 : init_count_(0),
26 shutting_down_(false), 32 shutting_down_(false),
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 ScopedIPCSupport::ScopedIPCSupport( 175 ScopedIPCSupport::ScopedIPCSupport(
170 scoped_refptr<base::TaskRunner> io_thread_task_runner) { 176 scoped_refptr<base::TaskRunner> io_thread_task_runner) {
171 ipc_support_initializer.Get().Init(io_thread_task_runner); 177 ipc_support_initializer.Get().Init(io_thread_task_runner);
172 } 178 }
173 179
174 ScopedIPCSupport::~ScopedIPCSupport() { 180 ScopedIPCSupport::~ScopedIPCSupport() {
175 ipc_support_initializer.Get().ShutDown(); 181 ipc_support_initializer.Get().ShutDown();
176 } 182 }
177 183
178 } // namespace IPC 184 } // namespace IPC
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698