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

Unified Diff: mojo/public/cpp/bindings/lib/binding_state.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/binding_state.h
diff --git a/mojo/public/cpp/bindings/lib/binding_state.h b/mojo/public/cpp/bindings/lib/binding_state.h
index 4fc35803163467f2306275e89c41e1c70df095d2..5eaf9c966a46104bae9e010b7f8951d71914b027 100644
--- a/mojo/public/cpp/bindings/lib/binding_state.h
+++ b/mojo/public/cpp/bindings/lib/binding_state.h
@@ -64,6 +64,8 @@ class SimpleBindingState {
AssociatedGroup* associated_group() { return nullptr; }
+ void FlushForTesting();
+
void EnableTestingMode();
protected:
@@ -72,7 +74,8 @@ class SimpleBindingState {
const char* interface_name,
std::unique_ptr<MessageReceiver> request_validator,
bool has_sync_methods,
- MessageReceiverWithResponderStatus* stub);
+ MessageReceiverWithResponderStatus* stub,
+ uint32_t interface_version);
void DestroyRouter();
@@ -105,7 +108,7 @@ class BindingState<Interface, false> : public SimpleBindingState {
SimpleBindingState::BindInternal(
std::move(handle), runner, Interface::Name_,
base::MakeUnique<typename Interface::RequestValidator_>(),
- Interface::HasSyncMethods_, &stub_);
+ Interface::HasSyncMethods_, &stub_, Interface::Version_);
}
InterfaceRequest<Interface> Unbind() {
@@ -159,6 +162,8 @@ class MultiplexedBindingState {
return endpoint_client_ ? endpoint_client_->associated_group() : nullptr;
}
+ void FlushForTesting();
+
void EnableTestingMode();
protected:
@@ -167,7 +172,8 @@ class MultiplexedBindingState {
const char* interface_name,
std::unique_ptr<MessageReceiver> request_validator,
bool has_sync_methods,
- MessageReceiverWithResponderStatus* stub);
+ MessageReceiverWithResponderStatus* stub,
+ uint32_t interface_version);
scoped_refptr<internal::MultiplexRouter> router_;
std::unique_ptr<InterfaceEndpointClient> endpoint_client_;
@@ -193,7 +199,7 @@ class BindingState<Interface, true> : public MultiplexedBindingState {
MultiplexedBindingState::BindInternal(
std::move(handle), runner, Interface::Name_,
base::MakeUnique<typename Interface::RequestValidator_>(),
- Interface::HasSyncMethods_, &stub_);
+ Interface::HasSyncMethods_, &stub_, Interface::Version_);
stub_.serialization_context()->group_controller = router_;
}
« no previous file with comments | « mojo/public/cpp/bindings/lib/associated_interface_ptr_state.h ('k') | mojo/public/cpp/bindings/lib/binding_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698