summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_process_manager.cc
diff options
context:
space:
mode:
authorandybons@chromium.org <andybons@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-09 04:14:02 +0000
committerandybons@chromium.org <andybons@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-09 04:14:02 +0000
commitcf390ea428a6c56280c61b5998c8ffffefa971c5 (patch)
treefe65fd6ae8816a3994b52efc18db625987a26c11 /chrome/browser/extensions/extension_process_manager.cc
parent3cd15376f3e5fdabe9f41c8f4b65f33025a3d0b6 (diff)
downloadchromium_src-cf390ea428a6c56280c61b5998c8ffffefa971c5.zip
chromium_src-cf390ea428a6c56280c61b5998c8ffffefa971c5.tar.gz
chromium_src-cf390ea428a6c56280c61b5998c8ffffefa971c5.tar.bz2
Fixes issue where clicking on a <SELECT> dropdown in an extension popup window would hard crash the browser.
I'm hoping that this will open up discussions for refactoring work amongst ExtensionHost and TabContentsView, since so much code is shared between the two and both need sufficient Mac love. BUG=29353 TEST=load a browser action with a popup that contains a SELECT element. click on the element and observe that it acts normally (no crashing). Review URL: http://codereview.chromium.org/465108 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34136 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_process_manager.cc')
-rw-r--r--chrome/browser/extensions/extension_process_manager.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/chrome/browser/extensions/extension_process_manager.cc b/chrome/browser/extensions/extension_process_manager.cc
index 02587a4..7d6ca0b 100644
--- a/chrome/browser/extensions/extension_process_manager.cc
+++ b/chrome/browser/extensions/extension_process_manager.cc
@@ -5,6 +5,9 @@
#include "chrome/browser/extensions/extension_process_manager.h"
#include "chrome/browser/browsing_instance.h"
+#if defined(OS_MACOSX)
+#include "chrome/browser/extensions/extension_host_mac.h"
+#endif
#include "chrome/browser/extensions/extension_host.h"
#include "chrome/browser/extensions/extensions_service.h"
#include "chrome/browser/profile.h"
@@ -59,7 +62,12 @@ ExtensionHost* ExtensionProcessManager::CreateView(Extension* extension,
DCHECK(extension);
DCHECK(browser);
ExtensionHost* host =
+#if defined(OS_MACOSX)
+ new ExtensionHostMac(extension, GetSiteInstanceForURL(url), url,
+ view_type);
+#else
new ExtensionHost(extension, GetSiteInstanceForURL(url), url, view_type);
+#endif
host->CreateView(browser);
OnExtensionHostCreated(host, false);
return host;
@@ -104,8 +112,14 @@ ExtensionHost* ExtensionProcessManager::CreatePopup(const GURL& url,
ExtensionHost* ExtensionProcessManager::CreateBackgroundHost(
Extension* extension, const GURL& url) {
ExtensionHost* host =
+#if defined(OS_MACOSX)
+ new ExtensionHostMac(extension, GetSiteInstanceForURL(url), url,
+ ViewType::EXTENSION_BACKGROUND_PAGE);
+#else
new ExtensionHost(extension, GetSiteInstanceForURL(url), url,
ViewType::EXTENSION_BACKGROUND_PAGE);
+#endif
+
host->CreateRenderViewSoon(NULL); // create a RenderViewHost with no view
OnExtensionHostCreated(host, true);
return host;