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 45f997ea06b7705f62594948466ffcecab9cbb83..495ebc9ae2c5917b8d26574a05b329a2f44bdbca 100644 |
--- a/content/public/browser/browser_ppapi_host.h |
+++ b/content/public/browser/browser_ppapi_host.h |
@@ -27,16 +27,33 @@ class PpapiHost; |
namespace content { |
+struct PepperRendererInstanceData; |
+ |
// Interface that allows components in the embedder app to talk to the |
// PpapiHost in the browser process. |
// |
// There will be one of these objects in the browser per plugin process. It |
// lives entirely on the I/O thread. |
-class CONTENT_EXPORT BrowserPpapiHost { |
+class CONTENT_EXPORT BrowserPpapiHost : |
+ public base::RefCountedThreadSafe<BrowserPpapiHost> { |
public: |
+ class Delegate { |
dmichael (off chromium)
2013/11/06 22:39:21
How about instead having something like this on Br
scheib
2013/11/15 01:22:17
Done.
|
+ public: |
+ virtual ~Delegate() {} |
+ |
+ // Called to handle a plugin instance transitioning in or out of idle state. |
+ virtual void OnIdleState(bool idle, |
+ const base::FilePath& profile_data_directory, |
+ const RenderViewHost* render_view_host, |
+ const GURL& document_url) = 0; |
+ }; |
+ |
// Creates a browser host and sets up an out-of-process proxy for an external |
// pepper plugin process. |
- static BrowserPpapiHost* CreateExternalPluginProcess( |
+ // |delegate| will be owned by the BrowserPpapiHost, is optional and may be |
+ // NULL, and is used only for OnIdleState for NaCl extensions. |
+ static scoped_refptr<BrowserPpapiHost> CreateExternalPluginProcess( |
+ Delegate* delegate, |
IPC::Sender* sender, |
ppapi::PpapiPermissions permissions, |
base::ProcessHandle plugin_child_process, |