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

Unified Diff: content/public/browser/browser_ppapi_host.h

Issue 10909138: Convert the async device ID getter to a chrome resource host (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 3 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 | « content/common/view_messages.h ('k') | content/public/browser/content_browser_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/browser_ppapi_host.h
diff --git a/content/public/browser/browser_ppapi_host.h b/content/public/browser/browser_ppapi_host.h
index aa9799071cd2460ab1fc02226121d90321348fe8..3e1db99a4b08fc2b93b3da28b0ed27ebc670f5c5 100644
--- a/content/public/browser/browser_ppapi_host.h
+++ b/content/public/browser/browser_ppapi_host.h
@@ -5,8 +5,12 @@
#ifndef CONTENT_PUBLIC_BROWSER_BROWSER_PPAPI_HOST_H_
#define CONTENT_PUBLIC_BROWSER_BROWSER_PPAPI_HOST_H_
+#include "base/callback_forward.h"
#include "base/process.h"
#include "content/common/content_export.h"
+#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/render_view_host.h"
+#include "ppapi/c/pp_instance.h"
namespace ppapi {
namespace host {
@@ -29,6 +33,22 @@ class CONTENT_EXPORT BrowserPpapiHost {
// Returns the handle to the plugin process.
virtual base::ProcessHandle GetPluginProcessHandle() const = 0;
+ // Returns true if the given PP_Instance is valid.
+ virtual bool IsValidInstance(PP_Instance instance) const = 0;
+
+ // Retrieves the process/view Ids associated with the RenderView containing
+ // the given instance and returns true on success. If the instance is
+ // invalid, the ids will be 0 and false will be returned.
+ //
+ // When a resource is created, the PP_Instance should already have been
+ // validated, and the resource hosts will be deleted when the resource is
+ // destroyed. So it should not generally be necessary to check for errors
+ // from this function except as a last-minute sanity check if you convert the
+ // IDs to a RenderView/ProcessHost on the UI thread.
+ virtual bool GetRenderViewIDsForInstance(PP_Instance instance,
+ int* render_process_id,
+ int* render_view_id) const = 0;
+
protected:
virtual ~BrowserPpapiHost() {}
};
« no previous file with comments | « content/common/view_messages.h ('k') | content/public/browser/content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698