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

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

Issue 2646853003: Mojo C++ bindings: Simplify associated interface API. (Closed)
Patch Set: . Created 3 years, 10 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/associated_interface_ptr_state.h
diff --git a/mojo/public/cpp/bindings/lib/associated_interface_ptr_state.h b/mojo/public/cpp/bindings/lib/associated_interface_ptr_state.h
index f6a7777cf8c02b61f181e348df1fcf52dc18ede6..72f79604226bc7ed8ea3f418532ee6df77b24c5f 100644
--- a/mojo/public/cpp/bindings/lib/associated_interface_ptr_state.h
+++ b/mojo/public/cpp/bindings/lib/associated_interface_ptr_state.h
@@ -23,8 +23,6 @@
#include "mojo/public/cpp/bindings/connection_error_callback.h"
#include "mojo/public/cpp/bindings/interface_endpoint_client.h"
#include "mojo/public/cpp/bindings/interface_id.h"
-#include "mojo/public/cpp/bindings/lib/control_message_handler.h"
-#include "mojo/public/cpp/bindings/lib/control_message_proxy.h"
#include "mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h"
#include "mojo/public/cpp/system/message_pipe.h"
@@ -48,15 +46,10 @@ class AssociatedInterfacePtrState {
uint32_t version() const { return version_; }
- uint32_t interface_id() const {
- DCHECK(is_bound());
- return endpoint_client_->interface_id();
- }
-
void QueryVersion(const base::Callback<void(uint32_t)>& callback) {
// It is safe to capture |this| because the callback won't be run after this
// object goes away.
- endpoint_client_->control_message_proxy()->QueryVersion(
+ endpoint_client_->QueryVersion(
base::Bind(&AssociatedInterfacePtrState::OnQueryVersion,
base::Unretained(this), callback));
}
@@ -66,12 +59,10 @@ class AssociatedInterfacePtrState {
return;
version_ = version;
- endpoint_client_->control_message_proxy()->RequireVersion(version);
+ endpoint_client_->RequireVersion(version);
}
- void FlushForTesting() {
- endpoint_client_->control_message_proxy()->FlushForTesting();
- }
+ void FlushForTesting() { endpoint_client_->FlushForTesting(); }
void CloseWithReason(uint32_t custom_reason, const std::string& description) {
endpoint_client_->CloseWithReason(custom_reason, description);
« no previous file with comments | « mojo/public/cpp/bindings/lib/associated_group_controller.cc ('k') | mojo/public/cpp/bindings/lib/binding_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698