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

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

Issue 2358133002: Turn //mojo/public/cpp/bindings and //mojo/public/cpp/system into components (Closed)
Patch Set: Fix wording Created 4 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_INTERNAL_H_ 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_MESSAGE_INTERNAL_H_
6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_MESSAGE_INTERNAL_H_ 6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_MESSAGE_INTERNAL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
11 11
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "mojo/public/cpp/bindings/bindings_export.h"
14 #include "mojo/public/cpp/bindings/lib/bindings_internal.h" 15 #include "mojo/public/cpp/bindings/lib/bindings_internal.h"
15 16
16 namespace mojo { 17 namespace mojo {
17 18
18 class Message; 19 class Message;
19 20
20 namespace internal { 21 namespace internal {
21 22
22 #pragma pack(push, 1) 23 #pragma pack(push, 1)
23 24
(...skipping 13 matching lines...) Expand all
37 struct MessageHeaderWithRequestID : MessageHeader { 38 struct MessageHeaderWithRequestID : MessageHeader {
38 // Only used if either kFlagExpectsResponse or kFlagIsResponse is set in 39 // Only used if either kFlagExpectsResponse or kFlagIsResponse is set in
39 // order to match responses with corresponding requests. 40 // order to match responses with corresponding requests.
40 uint64_t request_id; 41 uint64_t request_id;
41 }; 42 };
42 static_assert(sizeof(MessageHeaderWithRequestID) == 32, 43 static_assert(sizeof(MessageHeaderWithRequestID) == 32,
43 "Bad sizeof(MessageHeaderWithRequestID)"); 44 "Bad sizeof(MessageHeaderWithRequestID)");
44 45
45 #pragma pack(pop) 46 #pragma pack(pop)
46 47
47 class MessageDispatchContext { 48 class MOJO_CPP_BINDINGS_EXPORT MessageDispatchContext {
48 public: 49 public:
49 explicit MessageDispatchContext(Message* message); 50 explicit MessageDispatchContext(Message* message);
50 ~MessageDispatchContext(); 51 ~MessageDispatchContext();
51 52
52 static MessageDispatchContext* current(); 53 static MessageDispatchContext* current();
53 54
54 const base::Callback<void(const std::string&)>& GetBadMessageCallback(); 55 const base::Callback<void(const std::string&)>& GetBadMessageCallback();
55 56
56 private: 57 private:
57 MessageDispatchContext* outer_context_; 58 MessageDispatchContext* outer_context_;
58 Message* message_; 59 Message* message_;
59 base::Callback<void(const std::string&)> bad_message_callback_; 60 base::Callback<void(const std::string&)> bad_message_callback_;
60 61
61 DISALLOW_COPY_AND_ASSIGN(MessageDispatchContext); 62 DISALLOW_COPY_AND_ASSIGN(MessageDispatchContext);
62 }; 63 };
63 64
64 class SyncMessageResponseSetup { 65 class MOJO_CPP_BINDINGS_EXPORT SyncMessageResponseSetup {
65 public: 66 public:
66 static void SetCurrentSyncResponseMessage(Message* message); 67 static void SetCurrentSyncResponseMessage(Message* message);
67 }; 68 };
68 69
69 } // namespace internal 70 } // namespace internal
70 } // namespace mojo 71 } // namespace mojo
71 72
72 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_MESSAGE_INTERNAL_H_ 73 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_MESSAGE_INTERNAL_H_
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/lib/message_builder.h ('k') | mojo/public/cpp/bindings/lib/multiplex_router.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698