| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "extensions/browser/lazy_background_task_queue.h" | 5 #include "extensions/browser/lazy_background_task_queue.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "content/public/browser/browser_context.h" | 8 #include "content/public/browser/browser_context.h" |
| 9 #include "content/public/browser/notification_service.h" | 9 #include "content/public/browser/notification_service.h" |
| 10 #include "content/public/browser/render_process_host.h" | 10 #include "content/public/browser/render_process_host.h" |
| 11 #include "content/public/browser/render_view_host.h" | 11 #include "content/public/browser/render_view_host.h" |
| 12 #include "content/public/browser/site_instance.h" | 12 #include "content/public/browser/site_instance.h" |
| 13 #include "content/public/browser/web_contents.h" | 13 #include "content/public/browser/web_contents.h" |
| 14 #include "extensions/browser/extension_host.h" | 14 #include "extensions/browser/extension_host.h" |
| 15 #include "extensions/browser/extension_registry.h" | 15 #include "extensions/browser/extension_registry.h" |
| 16 #include "extensions/browser/extension_system.h" | 16 #include "extensions/browser/extension_system.h" |
| 17 #include "extensions/browser/extensions_browser_client.h" | 17 #include "extensions/browser/extensions_browser_client.h" |
| 18 #include "extensions/browser/notification_types.h" | 18 #include "extensions/browser/notification_types.h" |
| 19 #include "extensions/browser/process_manager.h" | 19 #include "extensions/browser/process_manager.h" |
| 20 #include "extensions/browser/process_map.h" | 20 #include "extensions/browser/process_map.h" |
| 21 #include "extensions/common/extension.h" | 21 #include "extensions/common/extension.h" |
| 22 #include "extensions/common/extension_messages.h" | |
| 23 #include "extensions/common/manifest_handlers/background_info.h" | 22 #include "extensions/common/manifest_handlers/background_info.h" |
| 24 #include "extensions/common/view_type.h" | 23 #include "extensions/common/view_type.h" |
| 25 | 24 |
| 26 namespace extensions { | 25 namespace extensions { |
| 27 | 26 |
| 28 LazyBackgroundTaskQueue::LazyBackgroundTaskQueue( | 27 LazyBackgroundTaskQueue::LazyBackgroundTaskQueue( |
| 29 content::BrowserContext* browser_context) | 28 content::BrowserContext* browser_context) |
| 30 : browser_context_(browser_context), extension_registry_observer_(this) { | 29 : browser_context_(browser_context), extension_registry_observer_(this) { |
| 31 registrar_.Add(this, | 30 registrar_.Add(this, |
| 32 extensions::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING, | 31 extensions::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING, |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 // task queue as well. | 181 // task queue as well. |
| 183 ExtensionsBrowserClient* browser_client = ExtensionsBrowserClient::Get(); | 182 ExtensionsBrowserClient* browser_client = ExtensionsBrowserClient::Get(); |
| 184 if (browser_client->HasOffTheRecordContext(browser_context)) { | 183 if (browser_client->HasOffTheRecordContext(browser_context)) { |
| 185 ProcessPendingTasks(NULL, | 184 ProcessPendingTasks(NULL, |
| 186 browser_client->GetOffTheRecordContext(browser_context), | 185 browser_client->GetOffTheRecordContext(browser_context), |
| 187 extension); | 186 extension); |
| 188 } | 187 } |
| 189 } | 188 } |
| 190 | 189 |
| 191 } // namespace extensions | 190 } // namespace extensions |
| OLD | NEW |