OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "mojo/system/raw_channel.h" | 5 #include "mojo/system/raw_channel.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <string.h> | 8 #include <string.h> |
9 #include <unistd.h> | 9 #include <unistd.h> |
10 | 10 |
11 #include <algorithm> | 11 #include <algorithm> |
12 #include <deque> | 12 #include <deque> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "base/basictypes.h" | 15 #include "base/basictypes.h" |
16 #include "base/bind.h" | 16 #include "base/bind.h" |
17 #include "base/compiler_specific.h" | 17 #include "base/compiler_specific.h" |
18 #include "base/location.h" | 18 #include "base/location.h" |
19 #include "base/logging.h" | 19 #include "base/logging.h" |
20 #include "base/memory/scoped_ptr.h" | 20 #include "base/memory/scoped_ptr.h" |
21 #include "base/memory/weak_ptr.h" | 21 #include "base/memory/weak_ptr.h" |
22 #include "base/message_loop/message_loop.h" | 22 #include "base/message_loop/message_loop.h" |
23 #include "base/posix/eintr_wrapper.h" | 23 #include "base/posix/eintr_wrapper.h" |
24 #include "base/synchronization/lock.h" | 24 #include "base/synchronization/lock.h" |
| 25 #include "mojo/system/embedder/platform_handle.h" |
25 #include "mojo/system/message_in_transit.h" | 26 #include "mojo/system/message_in_transit.h" |
26 #include "mojo/system/platform_handle.h" | |
27 | 27 |
28 namespace mojo { | 28 namespace mojo { |
29 namespace system { | 29 namespace system { |
30 | 30 |
31 namespace { | 31 namespace { |
32 | 32 |
33 const size_t kReadSize = 4096; | 33 const size_t kReadSize = 4096; |
34 | 34 |
35 class RawChannelPosix : public RawChannel, | 35 class RawChannelPosix : public RawChannel, |
36 public base::MessageLoopForIO::Watcher { | 36 public base::MessageLoopForIO::Watcher { |
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 // Static factory method declared in raw_channel.h. | 401 // Static factory method declared in raw_channel.h. |
402 // static | 402 // static |
403 RawChannel* RawChannel::Create(embedder::ScopedPlatformHandle handle, | 403 RawChannel* RawChannel::Create(embedder::ScopedPlatformHandle handle, |
404 Delegate* delegate, | 404 Delegate* delegate, |
405 base::MessageLoop* message_loop) { | 405 base::MessageLoop* message_loop) { |
406 return new RawChannelPosix(handle.Pass(), delegate, message_loop); | 406 return new RawChannelPosix(handle.Pass(), delegate, message_loop); |
407 } | 407 } |
408 | 408 |
409 } // namespace system | 409 } // namespace system |
410 } // namespace mojo | 410 } // namespace mojo |
OLD | NEW |