| 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 <sys/uio.h> | 8 #include <sys/uio.h> |
| 9 #include <unistd.h> | 9 #include <unistd.h> |
| 10 | 10 |
| 11 #include <algorithm> | 11 #include <algorithm> |
| 12 | 12 |
| 13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
| 14 #include "base/bind.h" | 14 #include "base/bind.h" |
| 15 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
| 16 #include "base/location.h" | 16 #include "base/location.h" |
| 17 #include "base/logging.h" | 17 #include "base/logging.h" |
| 18 #include "base/memory/scoped_ptr.h" | 18 #include "base/memory/scoped_ptr.h" |
| 19 #include "base/memory/weak_ptr.h" | 19 #include "base/memory/weak_ptr.h" |
| 20 #include "base/message_loop/message_loop.h" | 20 #include "base/message_loop/message_loop.h" |
| 21 #include "base/posix/eintr_wrapper.h" | 21 #include "base/posix/eintr_wrapper.h" |
| 22 #include "base/synchronization/lock.h" | 22 #include "base/synchronization/lock.h" |
| 23 #include "mojo/system/embedder/platform_handle.h" | 23 #include "mojo/embedder/platform_handle.h" |
| 24 | 24 |
| 25 namespace mojo { | 25 namespace mojo { |
| 26 namespace system { | 26 namespace system { |
| 27 | 27 |
| 28 namespace { | 28 namespace { |
| 29 | 29 |
| 30 class RawChannelPosix : public RawChannel, | 30 class RawChannelPosix : public RawChannel, |
| 31 public base::MessageLoopForIO::Watcher { | 31 public base::MessageLoopForIO::Watcher { |
| 32 public: | 32 public: |
| 33 RawChannelPosix(embedder::ScopedPlatformHandle handle, | 33 RawChannelPosix(embedder::ScopedPlatformHandle handle, |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 // Static factory method declared in raw_channel.h. | 314 // Static factory method declared in raw_channel.h. |
| 315 // static | 315 // static |
| 316 RawChannel* RawChannel::Create(embedder::ScopedPlatformHandle handle, | 316 RawChannel* RawChannel::Create(embedder::ScopedPlatformHandle handle, |
| 317 Delegate* delegate, | 317 Delegate* delegate, |
| 318 base::MessageLoopForIO* message_loop_for_io) { | 318 base::MessageLoopForIO* message_loop_for_io) { |
| 319 return new RawChannelPosix(handle.Pass(), delegate, message_loop_for_io); | 319 return new RawChannelPosix(handle.Pass(), delegate, message_loop_for_io); |
| 320 } | 320 } |
| 321 | 321 |
| 322 } // namespace system | 322 } // namespace system |
| 323 } // namespace mojo | 323 } // namespace mojo |
| OLD | NEW |