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

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

Issue 61063003: Keep NaCl plugins used in app background pages alive when active. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move callback impl to nacl_browser_delegate_impl.cc. Created 7 years, 1 month 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: 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..f7625c9b08aeec5d3b8915f7e2c771cc1ab893e1 100644
--- a/content/public/browser/browser_ppapi_host.h
+++ b/content/public/browser/browser_ppapi_host.h
@@ -34,6 +34,18 @@ namespace content {
// lives entirely on the I/O thread.
class CONTENT_EXPORT BrowserPpapiHost {
public:
+ struct OnIdleChangeInstanceStruct {
+ int render_process_id;
+ int render_view_id;
+ GURL document_url;
+ };
+ typedef std::vector<OnIdleChangeInstanceStruct> OnIdleChangeInstanceData;
+ typedef base::Callback<
+ void (OnIdleChangeInstanceData intance_data,
yzshen1 2013/11/21 18:01:50 You could use const & here.
scheib 2013/12/11 21:35:40 Done.
+ base::FilePath profile_data_directory,
yzshen1 2013/11/21 18:01:50 const &, please.
scheib 2013/12/11 21:35:40 Done.
+ bool idle)>
+ OnIdleChangeCallback;
+
// Creates a browser host and sets up an out-of-process proxy for an external
// pepper plugin process.
static BrowserPpapiHost* CreateExternalPluginProcess(
@@ -81,6 +93,9 @@ class CONTENT_EXPORT BrowserPpapiHost {
// Get the Document/Plugin URLs for the given PP_Instance.
virtual GURL GetDocumentURLForInstance(PP_Instance instance) = 0;
virtual GURL GetPluginURLForInstance(PP_Instance instance) = 0;
+
+ // Set callback used when the plugin transitions in or out of an idle state.
+ virtual void SetOnIdleChangeCallback(const OnIdleChangeCallback callback) = 0;
yzshen1 2013/11/21 18:01:50 const &, please
scheib 2013/12/11 21:35:40 Done.
};
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698