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

Unified Diff: mojo/public/cpp/bindings/interface_ptr.h

Issue 1660403003: Mojo C++ bindings: Rename InterfaceInfoPtr -> InterfaceHandle (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: using {{InterfaceName}}Handle = InterfaceHandle<{{InterfaceName}}> Created 4 years, 11 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/interface_ptr.h
diff --git a/mojo/public/cpp/bindings/interface_ptr.h b/mojo/public/cpp/bindings/interface_ptr.h
index 602ab0fc689a889d8494d5977ac79edc7580ea9d..c17e6bf2534b2f83c685b79770cb7cd27f546b68 100644
--- a/mojo/public/cpp/bindings/interface_ptr.h
+++ b/mojo/public/cpp/bindings/interface_ptr.h
@@ -9,7 +9,7 @@
#include <cstddef>
#include "mojo/public/cpp/bindings/callback.h"
-#include "mojo/public/cpp/bindings/interface_ptr_info.h"
+#include "mojo/public/cpp/bindings/interface_handle.h"
#include "mojo/public/cpp/bindings/lib/interface_ptr_internal.h"
#include "mojo/public/cpp/environment/environment.h"
#include "mojo/public/cpp/system/macros.h"
@@ -24,7 +24,7 @@ namespace mojo {
// This class is thread hostile, as is the local proxy it manages. All calls to
// this class or the proxy should be from the same thread that created it. If
// you need to move the proxy to a different thread, extract the
-// InterfacePtrInfo (containing just the message pipe and any version
+// InterfaceHandle (containing just the message pipe and any version
// information) using PassInterface(), pass it to a different thread, and
// create and bind a new InterfacePtr from that thread.
template <typename Interface>
@@ -66,7 +66,7 @@ class InterfacePtr {
// has the same effect as reset(). In this case, the InterfacePtr is not
// considered as bound.
void Bind(
- InterfacePtrInfo<Interface> info,
+ InterfaceHandle<Interface> info,
const MojoAsyncWaiter* waiter = Environment::GetDefaultAsyncWaiter()) {
reset();
if (info.is_valid())
@@ -153,7 +153,7 @@ class InterfacePtr {
// Unbinds the InterfacePtr and returns the information which could be used
// to setup an InterfacePtr again. This method may be used to move the proxy
// to a different thread (see class comments for details).
- InterfacePtrInfo<Interface> PassInterface() {
+ InterfaceHandle<Interface> PassInterface() {
State state;
internal_state_.Swap(&state);
@@ -177,7 +177,7 @@ class InterfacePtr {
// specified |waiter| will be used as in the InterfacePtr::Bind() method.
template <typename Interface>
InterfacePtr<Interface> MakeProxy(
- InterfacePtrInfo<Interface> info,
+ InterfaceHandle<Interface> info,
const MojoAsyncWaiter* waiter = Environment::GetDefaultAsyncWaiter()) {
InterfacePtr<Interface> ptr;
if (info.is_valid())

Powered by Google App Engine
This is Rietveld 408576698