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

Side by Side Diff: mojo/public/cpp/bindings/lib/control_message_handler.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 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_CONTROL_MESSAGE_HANDLER_H_ 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_CONTROL_MESSAGE_HANDLER_H_
6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_CONTROL_MESSAGE_HANDLER_H_ 6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_CONTROL_MESSAGE_HANDLER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
11 11
12 #include "base/compiler_specific.h"
12 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "mojo/public/cpp/bindings/bindings_export.h"
13 #include "mojo/public/cpp/bindings/lib/serialization_context.h" 15 #include "mojo/public/cpp/bindings/lib/serialization_context.h"
14 #include "mojo/public/cpp/bindings/message.h" 16 #include "mojo/public/cpp/bindings/message.h"
15 17
16 namespace mojo { 18 namespace mojo {
17 namespace internal { 19 namespace internal {
18 20
19 // Handlers for request messages defined in interface_control_messages.mojom. 21 // Handlers for request messages defined in interface_control_messages.mojom.
20 class ControlMessageHandler : public MessageReceiverWithResponderStatus { 22 class MOJO_CPP_BINDINGS_EXPORT ControlMessageHandler
23 : NON_EXPORTED_BASE(public MessageReceiverWithResponderStatus) {
21 public: 24 public:
22 static bool IsControlMessage(const Message* message); 25 static bool IsControlMessage(const Message* message);
23 26
24 explicit ControlMessageHandler(uint32_t interface_version); 27 explicit ControlMessageHandler(uint32_t interface_version);
25 ~ControlMessageHandler() override; 28 ~ControlMessageHandler() override;
26 29
27 // Call the following methods only if IsControlMessage() returned true. 30 // Call the following methods only if IsControlMessage() returned true.
28 bool Accept(Message* message) override; 31 bool Accept(Message* message) override;
29 // Takes ownership of |responder|. 32 // Takes ownership of |responder|.
30 bool AcceptWithResponder(Message* message, 33 bool AcceptWithResponder(Message* message,
(...skipping 17 matching lines...) Expand all
48 uint32_t disconnect_custom_reason_ = 0; 51 uint32_t disconnect_custom_reason_ = 0;
49 std::string disconnect_description_; 52 std::string disconnect_description_;
50 53
51 DISALLOW_COPY_AND_ASSIGN(ControlMessageHandler); 54 DISALLOW_COPY_AND_ASSIGN(ControlMessageHandler);
52 }; 55 };
53 56
54 } // namespace internal 57 } // namespace internal
55 } // namespace mojo 58 } // namespace mojo
56 59
57 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_CONTROL_MESSAGE_HANDLER_H_ 60 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_CONTROL_MESSAGE_HANDLER_H_
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/lib/binding_state.h ('k') | mojo/public/cpp/bindings/lib/control_message_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698