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

Unified Diff: ppapi/thunk/enter.cc

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: comment for 'active' instance. Created 7 years 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 | « ppapi/shared_impl/ppapi_globals.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/thunk/enter.cc
diff --git a/ppapi/thunk/enter.cc b/ppapi/thunk/enter.cc
index 47889dd15776c7b4feadada713b8496f835611bb..2adc7f2d47a88239af5bcfdff77263c5363b7062 100644
--- a/ppapi/thunk/enter.cc
+++ b/ppapi/thunk/enter.cc
@@ -32,16 +32,19 @@ namespace subtle {
EnterBase::EnterBase()
: resource_(NULL),
retval_(PP_OK) {
+ PpapiGlobals::Get()->MarkPluginIsActive();
}
EnterBase::EnterBase(PP_Resource resource)
: resource_(GetResource(resource)),
retval_(PP_OK) {
+ PpapiGlobals::Get()->MarkPluginIsActive();
}
EnterBase::EnterBase(PP_Instance instance, SingletonResourceID resource_id)
: resource_(GetSingletonResource(instance, resource_id)),
retval_(PP_OK) {
+ PpapiGlobals::Get()->MarkPluginIsActive();
}
EnterBase::EnterBase(PP_Resource resource,
@@ -49,6 +52,7 @@ EnterBase::EnterBase(PP_Resource resource,
: resource_(GetResource(resource)),
retval_(PP_OK) {
callback_ = new TrackedCallback(resource_, callback);
+ PpapiGlobals::Get()->MarkPluginIsActive();
}
EnterBase::EnterBase(PP_Instance instance, SingletonResourceID resource_id,
@@ -59,6 +63,7 @@ EnterBase::EnterBase(PP_Instance instance, SingletonResourceID resource_id,
if (!resource_)
retval_ = PP_ERROR_BADARGUMENT;
callback_ = new TrackedCallback(resource_, callback);
+ PpapiGlobals::Get()->MarkPluginIsActive();
}
EnterBase::~EnterBase() {
« no previous file with comments | « ppapi/shared_impl/ppapi_globals.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698