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

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

Issue 1991463002: Mojo: Expose untyped associated endpoints through public API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « mojo/public/cpp/bindings/lib/associated_group.cc ('k') | mojo/public/cpp/bindings/lib/binding_state.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 abb4f8f4f037281c18825f03e3e20eb00241c8bf..e214335a9ea88049e3abacc7325c2745571dd291 100644
--- a/mojo/public/cpp/bindings/lib/associated_interface_ptr_state.h
+++ b/mojo/public/cpp/bindings/lib/associated_interface_ptr_state.h
@@ -22,7 +22,7 @@
#include "mojo/public/cpp/bindings/lib/interface_endpoint_client.h"
#include "mojo/public/cpp/bindings/lib/interface_id.h"
#include "mojo/public/cpp/bindings/lib/multiplex_router.h"
-#include "mojo/public/cpp/bindings/lib/scoped_interface_endpoint_handle.h"
+#include "mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h"
#include "mojo/public/cpp/system/message_pipe.h"
namespace mojo {
@@ -90,7 +90,7 @@ class AssociatedInterfacePtrState {
version_ = info.version();
endpoint_client_.reset(new InterfaceEndpointClient(
- AssociatedInterfacePtrInfoHelper::PassHandle(&info), nullptr,
+ info.PassHandle(), nullptr,
base::WrapUnique(new typename Interface::ResponseValidator_()), false,
std::move(runner)));
proxy_.reset(new Proxy(endpoint_client_.get()));
@@ -103,11 +103,7 @@ class AssociatedInterfacePtrState {
ScopedInterfaceEndpointHandle handle = endpoint_client_->PassHandle();
endpoint_client_.reset();
proxy_.reset();
-
- AssociatedInterfacePtrInfo<Interface> result;
- result.set_version(version_);
- AssociatedInterfacePtrInfoHelper::SetHandle(&result, std::move(handle));
- return result;
+ return AssociatedInterfacePtrInfo<Interface>(std::move(handle), version_);
}
bool is_bound() const { return !!endpoint_client_; }
« no previous file with comments | « mojo/public/cpp/bindings/lib/associated_group.cc ('k') | mojo/public/cpp/bindings/lib/binding_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698