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

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

Issue 2114523002: Move more Mojo bindings helpers out of internal namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@group-controller
Patch Set: rebase Created 4 years, 5 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_PIPE_CONTROL_MESSAGE_HANDLER_H_
6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_PIPE_CONTROL_MESSAGE_HANDLER_H_ 6 #define MOJO_PUBLIC_CPP_BINDINGS_PIPE_CONTROL_MESSAGE_HANDLER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "mojo/public/cpp/bindings/interface_id.h" 9 #include "mojo/public/cpp/bindings/interface_id.h"
10 #include "mojo/public/cpp/bindings/lib/serialization_context.h" 10 #include "mojo/public/cpp/bindings/lib/serialization_context.h"
11 #include "mojo/public/cpp/bindings/message.h" 11 #include "mojo/public/cpp/bindings/message.h"
12 12
13 namespace mojo { 13 namespace mojo {
14 namespace internal {
15 14
16 class PipeControlMessageHandlerDelegate; 15 class PipeControlMessageHandlerDelegate;
17 16
18 // Handler for messages defined in pipe_control_messages.mojom. 17 // Handler for messages defined in pipe_control_messages.mojom.
19 class PipeControlMessageHandler : public MessageReceiver { 18 class PipeControlMessageHandler : public MessageReceiver {
20 public: 19 public:
21 explicit PipeControlMessageHandler( 20 explicit PipeControlMessageHandler(
22 PipeControlMessageHandlerDelegate* delegate); 21 PipeControlMessageHandlerDelegate* delegate);
23 ~PipeControlMessageHandler() override; 22 ~PipeControlMessageHandler() override;
24 23
(...skipping 12 matching lines...) Expand all
37 // If the method returns false, the message pipe should be closed. 36 // If the method returns false, the message pipe should be closed.
38 bool Accept(Message* message) override; 37 bool Accept(Message* message) override;
39 38
40 private: 39 private:
41 // |message| must have passed message header validation. 40 // |message| must have passed message header validation.
42 bool Validate(Message* message); 41 bool Validate(Message* message);
43 bool RunOrClosePipe(Message* message); 42 bool RunOrClosePipe(Message* message);
44 43
45 std::string description_; 44 std::string description_;
46 PipeControlMessageHandlerDelegate* const delegate_; 45 PipeControlMessageHandlerDelegate* const delegate_;
47 SerializationContext context_; 46 internal::SerializationContext context_;
48 47
49 DISALLOW_COPY_AND_ASSIGN(PipeControlMessageHandler); 48 DISALLOW_COPY_AND_ASSIGN(PipeControlMessageHandler);
50 }; 49 };
51 50
52 } // namespace internal
53 } // namespace mojo 51 } // namespace mojo
54 52
55 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_PIPE_CONTROL_MESSAGE_HANDLER_H_ 53 #endif // MOJO_PUBLIC_CPP_BINDINGS_PIPE_CONTROL_MESSAGE_HANDLER_H_
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/message_header_validator.h ('k') | mojo/public/cpp/bindings/pipe_control_message_handler_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698