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 #ifndef MOJO_EDK_SYSTEM_RAW_CHANNEL_H_ | 5 #ifndef MOJO_EDK_SYSTEM_RAW_CHANNEL_H_ |
6 #define MOJO_EDK_SYSTEM_RAW_CHANNEL_H_ | 6 #define MOJO_EDK_SYSTEM_RAW_CHANNEL_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
12 #include "base/synchronization/lock.h" | 12 #include "base/synchronization/lock.h" |
13 #include "mojo/edk/embedder/platform_handle_vector.h" | 13 #include "mojo/edk/embedder/platform_handle_vector.h" |
14 #include "mojo/edk/embedder/scoped_platform_handle.h" | 14 #include "mojo/edk/embedder/scoped_platform_handle.h" |
15 #include "mojo/edk/system/message_in_transit.h" | 15 #include "mojo/edk/system/message_in_transit.h" |
16 #include "mojo/edk/system/message_in_transit_queue.h" | 16 #include "mojo/edk/system/message_in_transit_queue.h" |
17 #include "mojo/edk/system/system_impl_export.h" | 17 #include "mojo/edk/system/system_impl_export.h" |
18 #include "mojo/public/cpp/system/macros.h" | 18 #include "third_party/mojo/src/mojo/public/cpp/system/macros.h" |
19 | 19 |
20 namespace mojo { | 20 namespace mojo { |
21 namespace edk { | 21 namespace edk { |
22 | 22 |
23 // |RawChannel| is an interface and base class for objects that wrap an OS | 23 // |RawChannel| is an interface and base class for objects that wrap an OS |
24 // "pipe". It presents the following interface to users: | 24 // "pipe". It presents the following interface to users: |
25 // - Receives and dispatches messages on an I/O thread (running a | 25 // - Receives and dispatches messages on an I/O thread (running a |
26 // |MessageLoopForIO|. | 26 // |MessageLoopForIO|. |
27 // - Provides a thread-safe way of writing messages (|WriteMessage()|); | 27 // - Provides a thread-safe way of writing messages (|WriteMessage()|); |
28 // writing/queueing messages will not block and is atomic from the point of | 28 // writing/queueing messages will not block and is atomic from the point of |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 // are only used/invalidated on the I/O thread. | 453 // are only used/invalidated on the I/O thread. |
454 base::WeakPtrFactory<RawChannel> weak_ptr_factory_; | 454 base::WeakPtrFactory<RawChannel> weak_ptr_factory_; |
455 | 455 |
456 MOJO_DISALLOW_COPY_AND_ASSIGN(RawChannel); | 456 MOJO_DISALLOW_COPY_AND_ASSIGN(RawChannel); |
457 }; | 457 }; |
458 | 458 |
459 } // namespace edk | 459 } // namespace edk |
460 } // namespace mojo | 460 } // namespace mojo |
461 | 461 |
462 #endif // MOJO_EDK_SYSTEM_RAW_CHANNEL_H_ | 462 #endif // MOJO_EDK_SYSTEM_RAW_CHANNEL_H_ |
OLD | NEW |