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

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

Issue 272323003: Mojo: Implement support for |Foo&| mojom syntax (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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/cpp/bindings/interface_request.h ('k') | 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 // Returns true if an error was encountered while reading from the pipe or 52 // Returns true if an error was encountered while reading from the pipe or
53 // waiting to read from the pipe. 53 // waiting to read from the pipe.
54 bool encountered_error() const { return error_; } 54 bool encountered_error() const { return error_; }
55 55
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 PassMessagePipe();
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 66
67 private: 67 private:
68 static void CallOnHandleReady(void* closure, MojoResult result); 68 static void CallOnHandleReady(void* closure, MojoResult result);
69 void OnHandleReady(MojoResult result); 69 void OnHandleReady(MojoResult result);
70 70
71 void WaitToReadMore(); 71 void WaitToReadMore();
72 void ReadMore(); 72 void ReadMore();
73 73
74 ErrorHandler* error_handler_; 74 ErrorHandler* error_handler_;
75 MojoAsyncWaiter* waiter_; 75 MojoAsyncWaiter* waiter_;
76 76
77 ScopedMessagePipeHandle message_pipe_; 77 ScopedMessagePipeHandle message_pipe_;
78 MessageReceiver* incoming_receiver_; 78 MessageReceiver* incoming_receiver_;
79 79
80 MojoAsyncWaitID async_wait_id_; 80 MojoAsyncWaitID async_wait_id_;
81 bool error_; 81 bool error_;
82 bool drop_writes_; 82 bool drop_writes_;
83 bool enforce_errors_from_incoming_receiver_; 83 bool enforce_errors_from_incoming_receiver_;
84 84
85 MOJO_DISALLOW_COPY_AND_ASSIGN(Connector); 85 MOJO_DISALLOW_COPY_AND_ASSIGN(Connector);
86 }; 86 };
87 87
88 } // namespace internal 88 } // namespace internal
89 } // namespace mojo 89 } // namespace mojo
90 90
91 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_CONNECTOR_H_ 91 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_CONNECTOR_H_
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/interface_request.h ('k') | mojo/public/cpp/bindings/lib/connector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698