Index: chrome/browser/extensions/extension_process_manager.cc |
diff --git a/chrome/browser/extensions/extension_process_manager.cc b/chrome/browser/extensions/extension_process_manager.cc |
index 6a2a88f720126915fbdb8b8eb973fe0726d4bbe3..ffd661a684e7dba079969f86884a90b7de7ae8f3 100644 |
--- a/chrome/browser/extensions/extension_process_manager.cc |
+++ b/chrome/browser/extensions/extension_process_manager.cc |
@@ -11,6 +11,7 @@ |
#include "base/string_number_conversions.h" |
#include "base/time.h" |
#include "chrome/browser/extensions/api/runtime/runtime_api.h" |
+#include "chrome/browser/extensions/app_extension_host_delegate.h" |
#include "chrome/browser/extensions/extension_process_manager.h" |
#include "chrome/browser/extensions/extension_host.h" |
#include "chrome/browser/extensions/extension_info_map.h" |
@@ -217,9 +218,11 @@ ExtensionHost* ExtensionProcessManager::CreateViewHost( |
ExtensionHost* host = |
#if defined(OS_MACOSX) |
new extensions::ExtensionHostMac( |
- extension, GetSiteInstanceForURL(url), url, view_type); |
+ extension, new ExtensionHost::Delegate(), |
+ GetSiteInstanceForURL(url), url, view_type); |
#else |
- new ExtensionHost(extension, GetSiteInstanceForURL(url), url, view_type); |
+ new ExtensionHost(extension, new ExtensionHost::Delegate(), |
+ GetSiteInstanceForURL(url), url, view_type); |
#endif |
host->CreateView(browser); |
OnExtensionHostCreated(host, false); |
@@ -280,14 +283,20 @@ void ExtensionProcessManager::CreateBackgroundHost( |
if (GetBackgroundHostForExtension(extension->id())) |
return; |
+ ExtensionHost::Delegate* host_delegate; |
+ if (extension->is_platform_app()) |
+ host_delegate = new extensions::AppBackgroundHostDelegate(); |
+ else |
+ host_delegate = new ExtensionHost::Delegate(); |
+ |
ExtensionHost* host = |
#if defined(OS_MACOSX) |
new extensions::ExtensionHostMac( |
- extension, GetSiteInstanceForURL(url), url, |
+ extension, host_delegate, GetSiteInstanceForURL(url), url, |
chrome::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE); |
#else |
- new ExtensionHost(extension, GetSiteInstanceForURL(url), url, |
- chrome::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE); |
+ new ExtensionHost(extension, host_delegate, GetSiteInstanceForURL(url), |
+ url, chrome::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE); |
#endif |
host->CreateRenderViewSoon(); |