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

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

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
« no previous file with comments | « no previous file | mojo/public/cpp/bindings/lib/connector.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 #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 "mojo/public/cpp/bindings/lib/message_queue.h" 8 #include "mojo/public/cpp/bindings/lib/message_queue.h"
9 #include "mojo/public/cpp/bindings/message.h" 9 #include "mojo/public/cpp/bindings/message.h"
10 #include "mojo/public/cpp/environment/default_async_waiter.h" 10 #include "mojo/public/cpp/environment/default_async_waiter.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 // Closes the pipe, triggering the error state. Connector is put into a 56 // Closes the pipe, triggering the error state. Connector is put into a
57 // quiescent state. 57 // quiescent state.
58 void CloseMessagePipe(); 58 void CloseMessagePipe();
59 59
60 // Releases the pipe, not triggering the error state. Connector is put into 60 // Releases the pipe, not triggering the error state. Connector is put into
61 // a quiescent state. 61 // a quiescent state.
62 ScopedMessagePipeHandle ReleaseMessagePipe(); 62 ScopedMessagePipeHandle ReleaseMessagePipe();
63 63
64 // MessageReceiver implementation: 64 // MessageReceiver implementation:
65 virtual bool Accept(Message* message) MOJO_OVERRIDE; 65 virtual bool Accept(Message* message) MOJO_OVERRIDE;
66 virtual bool AcceptWithResponder(Message* message, MessageReceiver* responder)
67 MOJO_OVERRIDE;
68 66
69 private: 67 private:
70 static void CallOnHandleReady(void* closure, MojoResult result); 68 static void CallOnHandleReady(void* closure, MojoResult result);
71 void OnHandleReady(MojoResult result); 69 void OnHandleReady(MojoResult result);
72 70
73 void WaitToReadMore(); 71 void WaitToReadMore();
74 void ReadMore(); 72 void ReadMore();
75 73
76 ErrorHandler* error_handler_; 74 ErrorHandler* error_handler_;
77 MojoAsyncWaiter* waiter_; 75 MojoAsyncWaiter* waiter_;
78 76
79 ScopedMessagePipeHandle message_pipe_; 77 ScopedMessagePipeHandle message_pipe_;
80 MessageReceiver* incoming_receiver_; 78 MessageReceiver* incoming_receiver_;
81 79
82 MojoAsyncWaitID async_wait_id_; 80 MojoAsyncWaitID async_wait_id_;
83 bool error_; 81 bool error_;
84 bool drop_writes_; 82 bool drop_writes_;
85 bool enforce_errors_from_incoming_receiver_; 83 bool enforce_errors_from_incoming_receiver_;
86 84
87 MOJO_DISALLOW_COPY_AND_ASSIGN(Connector); 85 MOJO_DISALLOW_COPY_AND_ASSIGN(Connector);
88 }; 86 };
89 87
90 } // namespace internal 88 } // namespace internal
91 } // namespace mojo 89 } // namespace mojo
92 90
93 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_CONNECTOR_H_ 91 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_CONNECTOR_H_
OLDNEW
« no previous file with comments | « no previous file | mojo/public/cpp/bindings/lib/connector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698