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

Unified Diff: ppapi/c/trusted/ppb_broker_trusted.h

Issue 6833002: Implemented PPB_Broker_Proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Synced, changed enum after syncing, and really fixed the Windows build. Created 9 years, 8 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 | « no previous file | ppapi/ppapi_shared_proxy.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/c/trusted/ppb_broker_trusted.h
diff --git a/ppapi/c/trusted/ppb_broker_trusted.h b/ppapi/c/trusted/ppb_broker_trusted.h
index 68f2a9718070ac6b1a7bcd676d0d3c44ace997b9..a3c498eb8d401c8ef9ec6a9211fc09723dea10d0 100644
--- a/ppapi/c/trusted/ppb_broker_trusted.h
+++ b/ppapi/c/trusted/ppb_broker_trusted.h
@@ -28,6 +28,11 @@
* with greater privileges than the plugin. The interface only supports
* out-of-process plugins and is to be used by proxy implementations. All
* functions should be called from the main thread only.
+ *
+ * A PPB_BrokerTrusted resource represents a connection to the broker. Its
+ * lifetime controls the lifetime of the broker, regardless of whether the
+ * handle is closed. The handle should be closed before the resource is
+ * released.
*/
struct PPB_BrokerTrusted {
/**
@@ -42,7 +47,12 @@ struct PPB_BrokerTrusted {
/**
* Connects to the trusted broker. It may have already
- * been launched by another plugin instance.
+ * been launched by another instance.
+ * The plugin takes ownership of the handle once the callback has been called
+ * with a result of PP_OK. The plugin should immediately call GetHandle and
+ * begin managing it. If the result is not PP_OK, the browser still owns the
+ * handle.
+ *
* Returns PP_ERROR_WOULD_BLOCK on success, and invokes
* the |connect_callback| asynchronously to complete.
* As this function should always be invoked from the main thread,
@@ -55,7 +65,8 @@ struct PPB_BrokerTrusted {
/**
* Returns the handle to the pipe. Use once Connect has completed.
* Returns PP_OK on success.
- * Each plugin instance has its own pipe.
+ * Each instance of this interface has its own pipe.
+ * handle is only set when returning PP_OK.
*/
int32_t (*GetHandle)(PP_Resource broker, int32_t* handle);
};
« no previous file with comments | « no previous file | ppapi/ppapi_shared_proxy.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698