| 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_PROXY_MESSAGE_PIPE_ENDPOINT_H_ | 5 #ifndef MOJO_SYSTEM_PROXY_MESSAGE_PIPE_ENDPOINT_H_ |
| 6 #define MOJO_SYSTEM_PROXY_MESSAGE_PIPE_ENDPOINT_H_ | 6 #define MOJO_SYSTEM_PROXY_MESSAGE_PIPE_ENDPOINT_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 | 61 |
| 62 private: | 62 private: |
| 63 void Detach(); | 63 void Detach(); |
| 64 | 64 |
| 65 #ifdef NDEBUG | 65 #ifdef NDEBUG |
| 66 void AssertConsistentState() const {} | 66 void AssertConsistentState() const {} |
| 67 #else | 67 #else |
| 68 void AssertConsistentState() const; | 68 void AssertConsistentState() const; |
| 69 #endif | 69 #endif |
| 70 | 70 |
| 71 bool is_attached() const { return !!channel_; } | 71 bool is_attached() const { return !!channel_.get(); } |
| 72 | 72 |
| 73 bool is_running() const { | 73 bool is_running() const { |
| 74 return remote_id_ != MessageInTransit::kInvalidEndpointId; | 74 return remote_id_ != MessageInTransit::kInvalidEndpointId; |
| 75 } | 75 } |
| 76 | 76 |
| 77 // This should only be set if we're attached. | 77 // This should only be set if we're attached. |
| 78 scoped_refptr<Channel> channel_; | 78 scoped_refptr<Channel> channel_; |
| 79 | 79 |
| 80 // |local_id_| should be set to something other than | 80 // |local_id_| should be set to something other than |
| 81 // |MessageInTransit::kInvalidEndpointId| when we're attached. | 81 // |MessageInTransit::kInvalidEndpointId| when we're attached. |
| (...skipping 11 matching lines...) Expand all Loading... |
| 93 // not ready to send them yet. | 93 // not ready to send them yet. |
| 94 MessageInTransitQueue paused_message_queue_; | 94 MessageInTransitQueue paused_message_queue_; |
| 95 | 95 |
| 96 DISALLOW_COPY_AND_ASSIGN(ProxyMessagePipeEndpoint); | 96 DISALLOW_COPY_AND_ASSIGN(ProxyMessagePipeEndpoint); |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 } // namespace system | 99 } // namespace system |
| 100 } // namespace mojo | 100 } // namespace mojo |
| 101 | 101 |
| 102 #endif // MOJO_SYSTEM_PROXY_MESSAGE_PIPE_ENDPOINT_H_ | 102 #endif // MOJO_SYSTEM_PROXY_MESSAGE_PIPE_ENDPOINT_H_ |
| OLD | NEW |