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

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: more cleanup Created 5 years, 2 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 #include "third_party/mojo/src/mojo/edk/embedder/embedder.h" 15 #include "third_party/mojo/src/mojo/edk/embedder/embedder.h"
16 #include "third_party/mojo/src/mojo/edk/embedder/process_delegate.h" 16 #include "third_party/mojo/src/mojo/edk/embedder/process_delegate.h"
17 17
18 namespace IPC { 18 namespace IPC {
19 19
20 namespace { 20 namespace {
21 21 // TODO(use_chrome_edk)
22 //class IPCSupportInitializer : public mojo::edk::ProcessDelegate {
22 class IPCSupportInitializer : public mojo::embedder::ProcessDelegate { 23 class IPCSupportInitializer : public mojo::embedder::ProcessDelegate {
23 public: 24 public:
24 IPCSupportInitializer() 25 IPCSupportInitializer()
25 : init_count_(0), 26 : init_count_(0),
26 shutting_down_(false), 27 shutting_down_(false),
27 was_shut_down_(false), 28 was_shut_down_(false),
28 observer_(nullptr) {} 29 observer_(nullptr) {}
29 30
30 ~IPCSupportInitializer() override { DCHECK(!observer_); } 31 ~IPCSupportInitializer() override { DCHECK(!observer_); }
31 32
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 ScopedIPCSupport::ScopedIPCSupport( 170 ScopedIPCSupport::ScopedIPCSupport(
170 scoped_refptr<base::TaskRunner> io_thread_task_runner) { 171 scoped_refptr<base::TaskRunner> io_thread_task_runner) {
171 ipc_support_initializer.Get().Init(io_thread_task_runner); 172 ipc_support_initializer.Get().Init(io_thread_task_runner);
172 } 173 }
173 174
174 ScopedIPCSupport::~ScopedIPCSupport() { 175 ScopedIPCSupport::~ScopedIPCSupport() {
175 ipc_support_initializer.Get().ShutDown(); 176 ipc_support_initializer.Get().ShutDown();
176 } 177 }
177 178
178 } // namespace IPC 179 } // namespace IPC
OLDNEW
« no previous file with comments | « ipc/mojo/run_all_unittests.cc ('k') | mojo/BUILD.gn » ('j') | mojo/edk/system/core.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698