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

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

Issue 299833008: Move AcceptWithResponder() out of the MessageReceiver interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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
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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 drop_writes_ = true; 79 drop_writes_ = true;
80 break; 80 break;
81 default: 81 default:
82 // This particular write was rejected, presumably because of bad input. 82 // This particular write was rejected, presumably because of bad input.
83 // The pipe is not necessarily in a bad state. 83 // The pipe is not necessarily in a bad state.
84 return false; 84 return false;
85 } 85 }
86 return true; 86 return true;
87 } 87 }
88 88
89 bool Connector::AcceptWithResponder(Message* message,
90 MessageReceiver* responder) {
91 // TODO(darin): Implement this!
92 assert(false);
93 return false;
94 }
95
96 // static 89 // static
97 void Connector::CallOnHandleReady(void* closure, MojoResult result) { 90 void Connector::CallOnHandleReady(void* closure, MojoResult result) {
98 Connector* self = static_cast<Connector*>(closure); 91 Connector* self = static_cast<Connector*>(closure);
99 self->OnHandleReady(result); 92 self->OnHandleReady(result);
100 } 93 }
101 94
102 void Connector::OnHandleReady(MojoResult result) { 95 void Connector::OnHandleReady(MojoResult result) {
103 async_wait_id_ = 0; 96 async_wait_id_ = 0;
104 97
105 if (result == MOJO_RESULT_OK) { 98 if (result == MOJO_RESULT_OK) {
(...skipping 27 matching lines...) Expand all
133 if (rv != MOJO_RESULT_OK || 126 if (rv != MOJO_RESULT_OK ||
134 (enforce_errors_from_incoming_receiver_ && !receiver_result)) { 127 (enforce_errors_from_incoming_receiver_ && !receiver_result)) {
135 error_ = true; 128 error_ = true;
136 break; 129 break;
137 } 130 }
138 } 131 }
139 } 132 }
140 133
141 } // namespace internal 134 } // namespace internal
142 } // namespace mojo 135 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/lib/connector.h ('k') | mojo/public/cpp/bindings/lib/interface_ptr_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698