Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(647)

Side by Side Diff: mojo/public/cpp/bindings/lib/connector.cc

Issue 336313007: Mojo: Rename MOJO_WAIT_FLAG_... -> MOJO_HANDLE_SIGNAL_.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « mojo/public/c/system/types.h ('k') | mojo/public/cpp/bindings/lib/sync_dispatcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "mojo/public/cpp/bindings/lib/connector.h" 5 #include "mojo/public/cpp/bindings/lib/connector.h"
6 6
7 #include <assert.h> 7 #include <assert.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 9
10 #include "mojo/public/cpp/bindings/error_handler.h" 10 #include "mojo/public/cpp/bindings/error_handler.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 } else { 107 } else {
108 error_ = true; 108 error_ = true;
109 } 109 }
110 110
111 if (error_ && error_handler_) 111 if (error_ && error_handler_)
112 error_handler_->OnConnectionError(); 112 error_handler_->OnConnectionError();
113 } 113 }
114 114
115 void Connector::WaitToReadMore() { 115 void Connector::WaitToReadMore() {
116 async_wait_id_ = waiter_->AsyncWait(message_pipe_.get().value(), 116 async_wait_id_ = waiter_->AsyncWait(message_pipe_.get().value(),
117 MOJO_WAIT_FLAG_READABLE, 117 MOJO_HANDLE_SIGNAL_READABLE,
118 MOJO_DEADLINE_INDEFINITE, 118 MOJO_DEADLINE_INDEFINITE,
119 &Connector::CallOnHandleReady, 119 &Connector::CallOnHandleReady,
120 this); 120 this);
121 } 121 }
122 122
123 bool Connector::ReadMore() { 123 bool Connector::ReadMore() {
124 while (true) { 124 while (true) {
125 bool receiver_result = false; 125 bool receiver_result = false;
126 126
127 // Detect if |this| was destroyed during message dispatch. Allow for the 127 // Detect if |this| was destroyed during message dispatch. Allow for the
(...skipping 20 matching lines...) Expand all
148 (enforce_errors_from_incoming_receiver_ && !receiver_result)) { 148 (enforce_errors_from_incoming_receiver_ && !receiver_result)) {
149 error_ = true; 149 error_ = true;
150 break; 150 break;
151 } 151 }
152 } 152 }
153 return true; 153 return true;
154 } 154 }
155 155
156 } // namespace internal 156 } // namespace internal
157 } // namespace mojo 157 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/c/system/types.h ('k') | mojo/public/cpp/bindings/lib/sync_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698