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

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

Issue 1955123003: Mojo C++ bindings: switch the remaining callsites of the old serialization interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@24_union_and_others
Patch Set: Created 4 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_PIPE_CONTROL_MESSAGE_HANDLER_H_ 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_PIPE_CONTROL_MESSAGE_HANDLER_H_
6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_PIPE_CONTROL_MESSAGE_HANDLER_H_ 6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_PIPE_CONTROL_MESSAGE_HANDLER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "mojo/public/cpp/bindings/lib/interface_id.h" 9 #include "mojo/public/cpp/bindings/lib/interface_id.h"
10 #include "mojo/public/cpp/bindings/lib/serialization_context.h"
10 #include "mojo/public/cpp/bindings/message.h" 11 #include "mojo/public/cpp/bindings/message.h"
11 12
12 namespace mojo { 13 namespace mojo {
13 namespace internal { 14 namespace internal {
14 15
15 class PipeControlMessageHandlerDelegate; 16 class PipeControlMessageHandlerDelegate;
16 17
17 // Handler for messages defined in pipe_control_messages.mojom. 18 // Handler for messages defined in pipe_control_messages.mojom.
18 class PipeControlMessageHandler : public MessageReceiver { 19 class PipeControlMessageHandler : public MessageReceiver {
19 public: 20 public:
(...skipping 11 matching lines...) Expand all
31 // - be a pipe control message (i.e., IsPipeControlMessage() returns true). 32 // - be a pipe control message (i.e., IsPipeControlMessage() returns true).
32 // If the method returns false, the message pipe should be closed. 33 // If the method returns false, the message pipe should be closed.
33 bool Accept(Message* message) override; 34 bool Accept(Message* message) override;
34 35
35 private: 36 private:
36 // |message| must have passed message header validation. 37 // |message| must have passed message header validation.
37 bool Validate(const Message* message); 38 bool Validate(const Message* message);
38 bool RunOrClosePipe(Message* message); 39 bool RunOrClosePipe(Message* message);
39 40
40 PipeControlMessageHandlerDelegate* const delegate_; 41 PipeControlMessageHandlerDelegate* const delegate_;
42 SerializationContext context_;
41 43
42 DISALLOW_COPY_AND_ASSIGN(PipeControlMessageHandler); 44 DISALLOW_COPY_AND_ASSIGN(PipeControlMessageHandler);
43 }; 45 };
44 46
45 } // namespace internal 47 } // namespace internal
46 } // namespace mojo 48 } // namespace mojo
47 49
48 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_PIPE_CONTROL_MESSAGE_HANDLER_H_ 50 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_PIPE_CONTROL_MESSAGE_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698