| 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_PUBLIC_CPP_BINDINGS_LIB_CONNECTOR_H_ | 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_CONNECTOR_H_ |
| 6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_CONNECTOR_H_ | 6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_CONNECTOR_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 void ResumeIncomingMethodCallProcessing(); | 113 void ResumeIncomingMethodCallProcessing(); |
| 114 | 114 |
| 115 // MessageReceiver implementation: | 115 // MessageReceiver implementation: |
| 116 bool Accept(Message* message) override; | 116 bool Accept(Message* message) override; |
| 117 | 117 |
| 118 MessagePipeHandle handle() const { | 118 MessagePipeHandle handle() const { |
| 119 DCHECK(thread_checker_.CalledOnValidThread()); | 119 DCHECK(thread_checker_.CalledOnValidThread()); |
| 120 return message_pipe_.get(); | 120 return message_pipe_.get(); |
| 121 } | 121 } |
| 122 | 122 |
| 123 // Allows |message_pipe_| be watched while others perform sync handle watching | 123 // Allows |message_pipe_| to be watched while others perform sync handle |
| 124 // on the same thread. Please see comments of | 124 // watching on the same thread. Please see comments of |
| 125 // SyncHandleWatcher::AllowWokenUpBySyncWatchOnSameThread(). | 125 // SyncHandleWatcher::AllowWokenUpBySyncWatchOnSameThread(). |
| 126 void AllowWokenUpBySyncWatchOnSameThread(); | 126 void AllowWokenUpBySyncWatchOnSameThread(); |
| 127 | 127 |
| 128 // Watches |message_pipe_| (as well as other handles registered to be watched | 128 // Watches |message_pipe_| (as well as other handles registered to be watched |
| 129 // together) synchronously. | 129 // together) synchronously. |
| 130 // This method: | 130 // This method: |
| 131 // - returns true when |should_stop| is set to true; | 131 // - returns true when |should_stop| is set to true; |
| 132 // - return false when any error occurs, including |message_pipe_| being | 132 // - return false when any error occurs, including |message_pipe_| being |
| 133 // closed. | 133 // closed. |
| 134 bool SyncWatch(const bool* should_stop); | 134 bool SyncWatch(const bool* should_stop); |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 base::WeakPtr<Connector> weak_self_; | 195 base::WeakPtr<Connector> weak_self_; |
| 196 base::WeakPtrFactory<Connector> weak_factory_; | 196 base::WeakPtrFactory<Connector> weak_factory_; |
| 197 | 197 |
| 198 DISALLOW_COPY_AND_ASSIGN(Connector); | 198 DISALLOW_COPY_AND_ASSIGN(Connector); |
| 199 }; | 199 }; |
| 200 | 200 |
| 201 } // namespace internal | 201 } // namespace internal |
| 202 } // namespace mojo | 202 } // namespace mojo |
| 203 | 203 |
| 204 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_CONNECTOR_H_ | 204 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_CONNECTOR_H_ |
| OLD | NEW |