aboutsummaryrefslogtreecommitdiff
path: root/mojo/public/cpp/bindings/lib/control_message_proxy.h
diff options
context:
space:
mode:
authorJay Civelli <jcivelli@google.com>2017-03-29 16:17:00 -0700
committerJay Civelli <jcivelli@google.com>2017-07-24 13:31:43 -0700
commit8ac9103e05b66812c25348943383f9365d1ce3e0 (patch)
tree63a61c9698e719de1a24de6fca21e29401f92842 /mojo/public/cpp/bindings/lib/control_message_proxy.h
parent24543f227908c2e949bb9a15b40276f59fcc9a0a (diff)
downloadlibmojo-8ac9103e05b66812c25348943383f9365d1ce3e0.tar.gz
libmojo: Uprev the library to r456626 from Chromium
Pulled the latest and greatest version of libmojo from Chromium. The merge was done against r456626 which corresponds to git commit 08266b3fca707804065a2cfd60331722ade41969 of Mar 14, 2017 Notable changes are: - generated binding files are now split in 2 files, interface.mojom.h and interface.mojom-shared.h Change-Id: Idcfd27310e2c9d3c452b671c7ff7a755c3963618
Diffstat (limited to 'mojo/public/cpp/bindings/lib/control_message_proxy.h')
-rw-r--r--mojo/public/cpp/bindings/lib/control_message_proxy.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/mojo/public/cpp/bindings/lib/control_message_proxy.h b/mojo/public/cpp/bindings/lib/control_message_proxy.h
index 5ec6ddc..2f9314e 100644
--- a/mojo/public/cpp/bindings/lib/control_message_proxy.h
+++ b/mojo/public/cpp/bindings/lib/control_message_proxy.h
@@ -7,8 +7,9 @@
#include <stdint.h>
-#include "base/callback_forward.h"
+#include "base/callback.h"
#include "base/macros.h"
+#include "mojo/public/cpp/bindings/bindings_export.h"
#include "mojo/public/cpp/bindings/lib/serialization_context.h"
namespace mojo {
@@ -18,18 +19,26 @@ class MessageReceiverWithResponder;
namespace internal {
// Proxy for request messages defined in interface_control_messages.mojom.
-class ControlMessageProxy {
+class MOJO_CPP_BINDINGS_EXPORT ControlMessageProxy {
public:
// Doesn't take ownership of |receiver|. It must outlive this object.
explicit ControlMessageProxy(MessageReceiverWithResponder* receiver);
+ ~ControlMessageProxy();
void QueryVersion(const base::Callback<void(uint32_t)>& callback);
void RequireVersion(uint32_t version);
- protected:
+ void FlushForTesting();
+ void OnConnectionError();
+
+ private:
+ void RunFlushForTestingClosure();
+
// Not owned.
MessageReceiverWithResponder* receiver_;
- SerializationContext context_;
+ bool encountered_error_ = false;
+
+ base::Closure run_loop_quit_closure_;
DISALLOW_COPY_AND_ASSIGN(ControlMessageProxy);
};