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

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

Issue 1701423002: Mojo C++ bindings: support sync methods - part 1. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
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_MESSAGE_BUILDER_H_ 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_MESSAGE_BUILDER_H_
6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_MESSAGE_BUILDER_H_ 6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_MESSAGE_BUILDER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 30 matching lines...) Expand all
41 uint64_t request_id); 41 uint64_t request_id);
42 }; 42 };
43 43
44 class RequestMessageBuilder : public MessageWithRequestIDBuilder { 44 class RequestMessageBuilder : public MessageWithRequestIDBuilder {
45 public: 45 public:
46 RequestMessageBuilder(uint32_t name, size_t payload_size) 46 RequestMessageBuilder(uint32_t name, size_t payload_size)
47 : MessageWithRequestIDBuilder(name, 47 : MessageWithRequestIDBuilder(name,
48 payload_size, 48 payload_size,
49 kMessageExpectsResponse, 49 kMessageExpectsResponse,
50 0) {} 50 0) {}
51
52 RequestMessageBuilder(uint32_t name,
53 size_t payload_size,
54 uint32_t extra_flags)
55 : MessageWithRequestIDBuilder(name,
56 payload_size,
57 kMessageExpectsResponse | extra_flags,
58 0) {}
51 }; 59 };
52 60
53 class ResponseMessageBuilder : public MessageWithRequestIDBuilder { 61 class ResponseMessageBuilder : public MessageWithRequestIDBuilder {
54 public: 62 public:
55 ResponseMessageBuilder(uint32_t name, 63 ResponseMessageBuilder(uint32_t name,
56 size_t payload_size, 64 size_t payload_size,
57 uint64_t request_id) 65 uint64_t request_id)
58 : MessageWithRequestIDBuilder(name, 66 : MessageWithRequestIDBuilder(name,
59 payload_size, 67 payload_size,
60 kMessageIsResponse, 68 kMessageIsResponse,
61 request_id) {} 69 request_id) {}
70
71 ResponseMessageBuilder(uint32_t name,
72 size_t payload_size,
73 uint64_t request_id,
74 uint32_t extra_flags)
75 : MessageWithRequestIDBuilder(name,
76 payload_size,
77 kMessageIsResponse | extra_flags,
78 request_id) {}
62 }; 79 };
63 80
64 } // namespace internal 81 } // namespace internal
65 } // namespace mojo 82 } // namespace mojo
66 83
67 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_MESSAGE_BUILDER_H_ 84 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_MESSAGE_BUILDER_H_
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/lib/interface_endpoint_client.cc ('k') | mojo/public/cpp/bindings/lib/message_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698