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/edk/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 #include <deque> | 12 #include <deque> |
13 | 13 |
14 #include "base/bind.h" | 14 #include "base/bind.h" |
15 #include "base/location.h" | 15 #include "base/location.h" |
16 #include "base/logging.h" | 16 #include "base/logging.h" |
17 #include "base/macros.h" | 17 #include "base/macros.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/synchronization/lock.h" | 21 #include "base/synchronization/lock.h" |
22 #include "mojo/embedder/platform_channel_utils_posix.h" | 22 #include "mojo/edk/embedder/platform_channel_utils_posix.h" |
23 #include "mojo/embedder/platform_handle.h" | 23 #include "mojo/edk/embedder/platform_handle.h" |
24 #include "mojo/embedder/platform_handle_vector.h" | 24 #include "mojo/edk/embedder/platform_handle_vector.h" |
25 #include "mojo/system/transport_data.h" | 25 #include "mojo/edk/system/transport_data.h" |
26 | 26 |
27 namespace mojo { | 27 namespace mojo { |
28 namespace system { | 28 namespace system { |
29 | 29 |
30 namespace { | 30 namespace { |
31 | 31 |
32 class RawChannelPosix : public RawChannel, | 32 class RawChannelPosix : public RawChannel, |
33 public base::MessageLoopForIO::Watcher { | 33 public base::MessageLoopForIO::Watcher { |
34 public: | 34 public: |
35 explicit RawChannelPosix(embedder::ScopedPlatformHandle handle); | 35 explicit RawChannelPosix(embedder::ScopedPlatformHandle handle); |
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
477 | 477 |
478 // Static factory method declared in raw_channel.h. | 478 // Static factory method declared in raw_channel.h. |
479 // static | 479 // static |
480 scoped_ptr<RawChannel> RawChannel::Create( | 480 scoped_ptr<RawChannel> RawChannel::Create( |
481 embedder::ScopedPlatformHandle handle) { | 481 embedder::ScopedPlatformHandle handle) { |
482 return make_scoped_ptr(new RawChannelPosix(handle.Pass())); | 482 return make_scoped_ptr(new RawChannelPosix(handle.Pass())); |
483 } | 483 } |
484 | 484 |
485 } // namespace system | 485 } // namespace system |
486 } // namespace mojo | 486 } // namespace mojo |
OLD | NEW |