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_SYSTEM_DISPATCHER_H_ | 5 #ifndef MOJO_SYSTEM_DISPATCHER_H_ |
6 #define MOJO_SYSTEM_DISPATCHER_H_ | 6 #define MOJO_SYSTEM_DISPATCHER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 }; | 365 }; |
366 | 366 |
367 // Wrapper around a |Dispatcher| pointer, while it's being processed to be | 367 // Wrapper around a |Dispatcher| pointer, while it's being processed to be |
368 // passed in a message pipe. See the comment about | 368 // passed in a message pipe. See the comment about |
369 // |Dispatcher::HandleTableAccess| for more details. | 369 // |Dispatcher::HandleTableAccess| for more details. |
370 // | 370 // |
371 // Note: This class is deliberately "thin" -- no more expensive than a | 371 // Note: This class is deliberately "thin" -- no more expensive than a |
372 // |Dispatcher*|. | 372 // |Dispatcher*|. |
373 class MOJO_SYSTEM_IMPL_EXPORT DispatcherTransport { | 373 class MOJO_SYSTEM_IMPL_EXPORT DispatcherTransport { |
374 public: | 374 public: |
375 DispatcherTransport() : dispatcher_(NULL) {} | 375 DispatcherTransport() : dispatcher_(nullptr) {} |
376 | 376 |
377 void End(); | 377 void End(); |
378 | 378 |
379 Dispatcher::Type GetType() const { return dispatcher_->GetType(); } | 379 Dispatcher::Type GetType() const { return dispatcher_->GetType(); } |
380 bool IsBusy() const { return dispatcher_->IsBusyNoLock(); } | 380 bool IsBusy() const { return dispatcher_->IsBusyNoLock(); } |
381 void Close() { dispatcher_->CloseNoLock(); } | 381 void Close() { dispatcher_->CloseNoLock(); } |
382 scoped_refptr<Dispatcher> CreateEquivalentDispatcherAndClose() { | 382 scoped_refptr<Dispatcher> CreateEquivalentDispatcherAndClose() { |
383 return dispatcher_->CreateEquivalentDispatcherAndCloseNoLock(); | 383 return dispatcher_->CreateEquivalentDispatcherAndCloseNoLock(); |
384 } | 384 } |
385 | 385 |
(...skipping 10 matching lines...) Expand all 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_SYSTEM_DISPATCHER_H_ | 405 #endif // MOJO_SYSTEM_DISPATCHER_H_ |
OLD | NEW |