| 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_DISPATCHER_H_ | 5 #ifndef MOJO_EDK_SYSTEM_DISPATCHER_H_ |
| 6 #define MOJO_EDK_SYSTEM_DISPATCHER_H_ | 6 #define MOJO_EDK_SYSTEM_DISPATCHER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 class ProxyMessagePipeEndpoint; | 41 class ProxyMessagePipeEndpoint; |
| 42 class TransportData; | 42 class TransportData; |
| 43 class Waiter; | 43 class Waiter; |
| 44 | 44 |
| 45 typedef std::vector<scoped_refptr<Dispatcher>> DispatcherVector; | 45 typedef std::vector<scoped_refptr<Dispatcher>> DispatcherVector; |
| 46 | 46 |
| 47 namespace test { | 47 namespace test { |
| 48 | 48 |
| 49 // Test helper. We need to declare it here so we can friend it. | 49 // Test helper. We need to declare it here so we can friend it. |
| 50 MOJO_SYSTEM_IMPL_EXPORT DispatcherTransport | 50 MOJO_SYSTEM_IMPL_EXPORT DispatcherTransport |
| 51 DispatcherTryStartTransport(Dispatcher* dispatcher); | 51 DispatcherTryStartTransport(Dispatcher* dispatcher); |
| 52 | 52 |
| 53 } // namespace test | 53 } // namespace test |
| 54 | 54 |
| 55 // A |Dispatcher| implements Mojo primitives that are "attached" to a particular | 55 // A |Dispatcher| implements Mojo primitives that are "attached" to a particular |
| 56 // handle. This includes most (all?) primitives except for |MojoWait...()|. This | 56 // handle. This includes most (all?) primitives except for |MojoWait...()|. This |
| 57 // object is thread-safe, with its state being protected by a single lock | 57 // object is thread-safe, with its state being protected by a single lock |
| 58 // |lock_|, which is also made available to implementation subclasses (via the | 58 // |lock_|, which is also made available to implementation subclasses (via the |
| 59 // |lock()| method). | 59 // |lock()| method). |
| 60 class MOJO_SYSTEM_IMPL_EXPORT Dispatcher | 60 class MOJO_SYSTEM_IMPL_EXPORT Dispatcher |
| 61 : public base::RefCountedThreadSafe<Dispatcher> { | 61 : public base::RefCountedThreadSafe<Dispatcher> { |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 | 396 |
| 397 Dispatcher* dispatcher_; | 397 Dispatcher* dispatcher_; |
| 398 | 398 |
| 399 // Copy and assign allowed. | 399 // Copy and assign allowed. |
| 400 }; | 400 }; |
| 401 | 401 |
| 402 } // namespace system | 402 } // namespace system |
| 403 } // namespace mojo | 403 } // namespace mojo |
| 404 | 404 |
| 405 #endif // MOJO_EDK_SYSTEM_DISPATCHER_H_ | 405 #endif // MOJO_EDK_SYSTEM_DISPATCHER_H_ |
| OLD | NEW |