| Index: chrome/browser/extensions/lazy_background_task_queue.h
|
| diff --git a/chrome/browser/extensions/lazy_background_task_queue.h b/chrome/browser/extensions/lazy_background_task_queue.h
|
| index 12b85ba73049d51f84c15d84801464815d0c8deb..abe71b21865a2647572f8747e787e0018e064289 100644
|
| --- a/chrome/browser/extensions/lazy_background_task_queue.h
|
| +++ b/chrome/browser/extensions/lazy_background_task_queue.h
|
| @@ -7,11 +7,13 @@
|
| #pragma once
|
|
|
| #include <map>
|
| +#include <set>
|
| #include <string>
|
|
|
| #include "base/compiler_specific.h"
|
| #include "base/callback_forward.h"
|
| #include "base/memory/linked_ptr.h"
|
| +#include "base/memory/weak_ptr.h"
|
| #include "content/public/browser/notification_observer.h"
|
| #include "content/public/browser/notification_registrar.h"
|
|
|
| @@ -27,7 +29,9 @@ namespace extensions {
|
| //
|
| // It is the consumer's responsibility to use this class when appropriate, i.e.
|
| // only with extensions that have not-yet-loaded lazy background pages.
|
| -class LazyBackgroundTaskQueue : public content::NotificationObserver {
|
| +class LazyBackgroundTaskQueue
|
| + : public content::NotificationObserver,
|
| + public base::SupportsWeakPtr<LazyBackgroundTaskQueue> {
|
| public:
|
| typedef base::Callback<void(ExtensionHost*)> PendingTask;
|
|
|
| @@ -56,6 +60,10 @@ class LazyBackgroundTaskQueue : public content::NotificationObserver {
|
| typedef std::vector<PendingTask> PendingTasksList;
|
| typedef std::map<PendingTasksKey,
|
| linked_ptr<PendingTasksList> > PendingTasksMap;
|
| + typedef std::set<PendingTasksKey> PendingPageLoadList;
|
| +
|
| + void StartLazyBackgroundPage(Profile* profile,
|
| + const std::string& extension_id);
|
|
|
| // content::NotificationObserver interface.
|
| virtual void Observe(int type,
|
| @@ -72,6 +80,7 @@ class LazyBackgroundTaskQueue : public content::NotificationObserver {
|
| Profile* profile_;
|
| content::NotificationRegistrar registrar_;
|
| PendingTasksMap pending_tasks_;
|
| + PendingPageLoadList pending_page_loads_;
|
| };
|
|
|
| } // namespace extensions
|
|
|