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

Unified Diff: mojo/public/cpp/bindings/lib/control_message_proxy.h

Issue 2280483002: Add FlushForTesting to InterfacePtr and Binding. (Closed)
Patch Set: Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: mojo/public/cpp/bindings/lib/control_message_proxy.h
diff --git a/mojo/public/cpp/bindings/lib/control_message_proxy.h b/mojo/public/cpp/bindings/lib/control_message_proxy.h
index 5ec6ddca351e7ce675cb143b3fe0a77c406d2f90..c3260d1095f9dc65d8f9b82f551696af1be52627 100644
--- a/mojo/public/cpp/bindings/lib/control_message_proxy.h
+++ b/mojo/public/cpp/bindings/lib/control_message_proxy.h
@@ -7,7 +7,7 @@
#include <stdint.h>
-#include "base/callback_forward.h"
+#include "base/callback.h"
#include "base/macros.h"
#include "mojo/public/cpp/bindings/lib/serialization_context.h"
@@ -22,14 +22,24 @@ class 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);
};
« no previous file with comments | « mojo/public/cpp/bindings/lib/control_message_handler.cc ('k') | mojo/public/cpp/bindings/lib/control_message_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698