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

Side by Side Diff: chrome/browser/extensions/lazy_background_task_queue.h

Issue 10824030: Move ExtensionHost into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Latest master for cq Created 8 years, 4 months 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_EXTENSIONS_LAZY_BACKGROUND_TASK_QUEUE_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_LAZY_BACKGROUND_TASK_QUEUE_H_
6 #define CHROME_BROWSER_EXTENSIONS_LAZY_BACKGROUND_TASK_QUEUE_H_ 6 #define CHROME_BROWSER_EXTENSIONS_LAZY_BACKGROUND_TASK_QUEUE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
11 11
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/callback_forward.h" 13 #include "base/callback_forward.h"
14 #include "base/memory/linked_ptr.h" 14 #include "base/memory/linked_ptr.h"
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "content/public/browser/notification_observer.h" 16 #include "content/public/browser/notification_observer.h"
17 #include "content/public/browser/notification_registrar.h" 17 #include "content/public/browser/notification_registrar.h"
18 18
19 class ExtensionHost;
20 class Profile; 19 class Profile;
21 20
22 namespace extensions { 21 namespace extensions {
23
24 class Extension; 22 class Extension;
23 class ExtensionHost;
25 24
26 // This class maintains a queue of tasks that should execute when an 25 // This class maintains a queue of tasks that should execute when an
27 // extension's lazy background page is loaded. It is also in charge of loading 26 // extension's lazy background page is loaded. It is also in charge of loading
28 // the page when the first task is queued. 27 // the page when the first task is queued.
29 // 28 //
30 // It is the consumer's responsibility to use this class when appropriate, i.e. 29 // It is the consumer's responsibility to use this class when appropriate, i.e.
31 // only with extensions that have not-yet-loaded lazy background pages. 30 // only with extensions that have not-yet-loaded lazy background pages.
32 class LazyBackgroundTaskQueue 31 class LazyBackgroundTaskQueue
33 : public content::NotificationObserver, 32 : public content::NotificationObserver,
34 public base::SupportsWeakPtr<LazyBackgroundTaskQueue> { 33 public base::SupportsWeakPtr<LazyBackgroundTaskQueue> {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 80
82 Profile* profile_; 81 Profile* profile_;
83 content::NotificationRegistrar registrar_; 82 content::NotificationRegistrar registrar_;
84 PendingTasksMap pending_tasks_; 83 PendingTasksMap pending_tasks_;
85 PendingPageLoadList pending_page_loads_; 84 PendingPageLoadList pending_page_loads_;
86 }; 85 };
87 86
88 } // namespace extensions 87 } // namespace extensions
89 88
90 #endif // CHROME_BROWSER_EXTENSIONS_LAZY_BACKGROUND_TASK_QUEUE_H_ 89 #endif // CHROME_BROWSER_EXTENSIONS_LAZY_BACKGROUND_TASK_QUEUE_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/lazy_background_page_apitest.cc ('k') | chrome/browser/extensions/lazy_background_task_queue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698