Index: chrome/browser/ui/extensions/shell_window.cc |
diff --git a/chrome/browser/ui/extensions/shell_window.cc b/chrome/browser/ui/extensions/shell_window.cc |
index 869f679a0e525f9d8f354b5d0ac35f0687de568e..dd27fa1c36b60c8fb8e3d32bf6920627dc8db560 100644 |
--- a/chrome/browser/ui/extensions/shell_window.cc |
+++ b/chrome/browser/ui/extensions/shell_window.cc |
@@ -8,6 +8,7 @@ |
#include "chrome/browser/extensions/extension_process_manager.h" |
#include "chrome/browser/extensions/extension_tabs_module_constants.h" |
#include "chrome/browser/extensions/extension_window_controller.h" |
+#include "chrome/browser/extensions/platform_app_host.h" |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/common/chrome_notification_types.h" |
#include "chrome/common/extensions/extension.h" |
@@ -90,17 +91,18 @@ ShellWindow* ShellWindow::Create(Profile* profile, |
// This object will delete itself when the window is closed. |
return ShellWindow::CreateShellWindow( |
- manager->CreateShellHost(extension, url)); |
+ new PlatformAppHost(profile, extension, url)); |
benwells
2012/04/18 12:08:44
I've tested this gets deleted when the shell windo
|
} |
void ShellWindow::Observe(int type, |
const content::NotificationSource& source, |
const content::NotificationDetails& details) { |
switch (type) { |
- case chrome::NOTIFICATION_EXTENSION_HOST_VIEW_SHOULD_CLOSE: |
- if (content::Details<ExtensionHost>(host_.get()) == details) |
- Close(); |
- break; |
+ // TODO(benwells): Use new PLATFORM_HOST_VIEW_SHOULD_CLOSE |
+ // case chrome::NOTIFICATION_EXTENSION_HOST_VIEW_SHOULD_CLOSE: |
+ // if (content::Details<ExtensionHost>(host_.get()) == details) |
+ // Close(); |
+ // break; |
case chrome::NOTIFICATION_EXTENSION_UNLOADED: { |
const Extension* unloaded_extension = |
content::Details<UnloadedExtensionInfo>(details)->extension; |
@@ -118,7 +120,7 @@ void ShellWindow::Observe(int type, |
} |
} |
-ShellWindow::ShellWindow(ExtensionHost* host) |
+ShellWindow::ShellWindow(PlatformAppHost* host) |
: host_(host) { |
// Close the window in response to window.close() and the like. |
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_VIEW_SHOULD_CLOSE, |