summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/lazy_background_task_queue.h
diff options
context:
space:
mode:
authormpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-03 18:28:36 +0000
committermpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-03 18:28:36 +0000
commitd79e3ab0a375657890bbcdf13aa7f22014ab5f22 (patch)
treef5afb61c83e06025f52576d3927f10762d788396 /chrome/browser/extensions/lazy_background_task_queue.h
parentbabfb240d76d87c726fb20e4153bba958d7e4f8c (diff)
downloadchromium_src-d79e3ab0a375657890bbcdf13aa7f22014ab5f22.zip
chromium_src-d79e3ab0a375657890bbcdf13aa7f22014ab5f22.tar.gz
chromium_src-d79e3ab0a375657890bbcdf13aa7f22014ab5f22.tar.bz2
Fix some issues with extension messaging for transient pages.
- Calling sendResponse within an onMessage listener no longer throws an error. - Sending a message to a transient page that is only partially loaded no longer fails. BUG=120531 TEST=no Review URL: https://chromiumcodereview.appspot.com/9968068 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130417 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/lazy_background_task_queue.h')
-rw-r--r--chrome/browser/extensions/lazy_background_task_queue.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/browser/extensions/lazy_background_task_queue.h b/chrome/browser/extensions/lazy_background_task_queue.h
index 63936b6..0f4c830 100644
--- a/chrome/browser/extensions/lazy_background_task_queue.h
+++ b/chrome/browser/extensions/lazy_background_task_queue.h
@@ -15,6 +15,7 @@
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
+class Extension;
class ExtensionHost;
class Profile;
@@ -31,6 +32,10 @@ class LazyBackgroundTaskQueue : public content::NotificationObserver {
explicit LazyBackgroundTaskQueue(Profile* profile);
virtual ~LazyBackgroundTaskQueue();
+ // Returns true if the task should be added to the queue (that is, if the
+ // extension has a lazy background page that isn't ready yet).
+ bool ShouldEnqueueTask(Profile* profile, const Extension* extension);
+
// Adds a task to the queue for a given extension. If this is the first
// task added for the extension, its lazy background page will be loaded.
void AddPendingTask(