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

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: Removed check for valid handle in GetHandle. Makes GetHandle behave the same whether proxied or not. 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') | ppapi/proxy/ppb_broker_proxy.cc » ('J')
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..130a5ca3204c4136c1e25c488d35fd9bd4c25297 100644
--- a/ppapi/c/trusted/ppb_broker_trusted.h
+++ b/ppapi/c/trusted/ppb_broker_trusted.h
@@ -10,6 +10,8 @@
#include "ppapi/c/pp_instance.h"
#include "ppapi/c/pp_resource.h"
+// DO NOT USE THIS INTERFACE
brettw 2011/04/15 16:09:25 I'd probably just delete this. It's a trusted one
ddorwin 2011/04/15 18:41:32 Done.
+// TODO(ddorwin): Implement the required UX.
#define PPB_BROKER_TRUSTED_INTERFACE "PPB_BrokerTrusted;0.1"
/**
@@ -28,6 +30,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 +49,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 +67,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') | ppapi/proxy/ppb_broker_proxy.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698