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/edk/system/raw_channel.h" | 5 #include "third_party/mojo/src/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/memory/scoped_ptr.h" | 17 #include "base/memory/scoped_ptr.h" |
18 #include "base/memory/weak_ptr.h" | 18 #include "base/memory/weak_ptr.h" |
19 #include "base/message_loop/message_loop.h" | 19 #include "base/message_loop/message_loop.h" |
20 #include "base/synchronization/lock.h" | 20 #include "base/synchronization/lock.h" |
21 #include "mojo/edk/embedder/platform_channel_utils_posix.h" | |
22 #include "mojo/edk/embedder/platform_handle.h" | |
23 #include "mojo/edk/embedder/platform_handle_vector.h" | |
24 #include "mojo/edk/system/transport_data.h" | |
25 #include "mojo/public/cpp/system/macros.h" | 21 #include "mojo/public/cpp/system/macros.h" |
| 22 #include "third_party/mojo/src/mojo/edk/embedder/platform_channel_utils_posix.h" |
| 23 #include "third_party/mojo/src/mojo/edk/embedder/platform_handle.h" |
| 24 #include "third_party/mojo/src/mojo/edk/embedder/platform_handle_vector.h" |
| 25 #include "third_party/mojo/src/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 final : public RawChannel, | 32 class RawChannelPosix final : 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 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 | 470 |
471 // Static factory method declared in raw_channel.h. | 471 // Static factory method declared in raw_channel.h. |
472 // static | 472 // static |
473 scoped_ptr<RawChannel> RawChannel::Create( | 473 scoped_ptr<RawChannel> RawChannel::Create( |
474 embedder::ScopedPlatformHandle handle) { | 474 embedder::ScopedPlatformHandle handle) { |
475 return make_scoped_ptr(new RawChannelPosix(handle.Pass())); | 475 return make_scoped_ptr(new RawChannelPosix(handle.Pass())); |
476 } | 476 } |
477 | 477 |
478 } // namespace system | 478 } // namespace system |
479 } // namespace mojo | 479 } // namespace mojo |
OLD | NEW |