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

Side by Side Diff: mojo/public/cpp/bindings/message.h

Issue 1755003002: Remove MOJO_DISALLOW_COPY_AND_ASSIGN and MOJO_ALLOW_UNUSED_LOCAL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 9 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_MESSAGE_H_ 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_MESSAGE_H_
6 #define MOJO_PUBLIC_CPP_BINDINGS_MESSAGE_H_ 6 #define MOJO_PUBLIC_CPP_BINDINGS_MESSAGE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 89
90 // Access the underlying Buffer interface. 90 // Access the underlying Buffer interface.
91 internal::Buffer* buffer() { return buffer_.get(); } 91 internal::Buffer* buffer() { return buffer_.get(); }
92 92
93 private: 93 private:
94 void CloseHandles(); 94 void CloseHandles();
95 95
96 scoped_ptr<internal::PickleBuffer> buffer_; 96 scoped_ptr<internal::PickleBuffer> buffer_;
97 std::vector<Handle> handles_; 97 std::vector<Handle> handles_;
98 98
99 MOJO_DISALLOW_COPY_AND_ASSIGN(Message); 99 DISALLOW_COPY_AND_ASSIGN(Message);
100 }; 100 };
101 101
102 class MessageReceiver { 102 class MessageReceiver {
103 public: 103 public:
104 virtual ~MessageReceiver() {} 104 virtual ~MessageReceiver() {}
105 105
106 // The receiver may mutate the given message. Returns true if the message 106 // The receiver may mutate the given message. Returns true if the message
107 // was accepted and false otherwise, indicating that the message was invalid 107 // was accepted and false otherwise, indicating that the message was invalid
108 // or malformed. 108 // or malformed.
109 virtual bool Accept(Message* message) MOJO_WARN_UNUSED_RESULT = 0; 109 virtual bool Accept(Message* message) MOJO_WARN_UNUSED_RESULT = 0;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 // the caller should wait on the handle to become readable. Returns 166 // the caller should wait on the handle to become readable. Returns
167 // MOJO_RESULT_OK if the message was read successfully and should be 167 // MOJO_RESULT_OK if the message was read successfully and should be
168 // dispatched, otherwise returns an error code if something went wrong. 168 // dispatched, otherwise returns an error code if something went wrong.
169 // 169 //
170 // NOTE: The message hasn't been validated and may be malformed! 170 // NOTE: The message hasn't been validated and may be malformed!
171 MojoResult ReadMessage(MessagePipeHandle handle, Message* message); 171 MojoResult ReadMessage(MessagePipeHandle handle, Message* message);
172 172
173 } // namespace mojo 173 } // namespace mojo
174 174
175 #endif // MOJO_PUBLIC_CPP_BINDINGS_MESSAGE_H_ 175 #endif // MOJO_PUBLIC_CPP_BINDINGS_MESSAGE_H_
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/lib/validation_errors.h ('k') | mojo/public/cpp/bindings/tests/binding_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698