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

Unified Diff: chrome/browser/ui/extensions/shell_window.cc

Issue 10119003: Pull shell window stuff out of ExtensionHost and put in ShellWindow (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
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,

Powered by Google App Engine
This is Rietveld 408576698