diff options
author | andybons@chromium.org <andybons@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-21 21:55:36 +0000 |
---|---|---|
committer | andybons@chromium.org <andybons@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-21 21:55:36 +0000 |
commit | 7101d7b13c6a3318e573c3f358853a0d67d5adc9 (patch) | |
tree | 4c93e45ae0121241eee17605f1e091584bae9215 /chrome/browser/cocoa/extensions/extension_popup_controller.mm | |
parent | c916426ad0439af17dfb864d7731bfff11badaac (diff) | |
download | chromium_src-7101d7b13c6a3318e573c3f358853a0d67d5adc9.zip chromium_src-7101d7b13c6a3318e573c3f358853a0d67d5adc9.tar.gz chromium_src-7101d7b13c6a3318e573c3f358853a0d67d5adc9.tar.bz2 |
[Mac] Fixes a bug where an ExtensionPopupController object's pointer was never being nil'd out when it resigned its key state, leading to a obj_msgSend from a dirty pointer. Also makes sure that other areas of Page Action code are properly using nil instead of NULL where necessary.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/508010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35109 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/extensions/extension_popup_controller.mm')
-rw-r--r-- | chrome/browser/cocoa/extensions/extension_popup_controller.mm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/chrome/browser/cocoa/extensions/extension_popup_controller.mm b/chrome/browser/cocoa/extensions/extension_popup_controller.mm index b2bc489..204c755 100644 --- a/chrome/browser/cocoa/extensions/extension_popup_controller.mm +++ b/chrome/browser/cocoa/extensions/extension_popup_controller.mm @@ -13,6 +13,7 @@ #include "chrome/browser/extensions/extension_host.h" #include "chrome/browser/extensions/extension_process_manager.h" #include "chrome/browser/profile.h" +#include "chrome/common/notification_service.h" // The minimum/maximum dimensions of the popup. // The minimum is just a little larger than the size of the button itself. @@ -95,7 +96,10 @@ const NSTimeInterval kAnimationDuration = 0.2; - (void)windowDidResignKey:(NSNotification *)notification { DCHECK_EQ([notification object], [self window]); - [self close]; + NotificationService::current()->Notify( + NotificationType::EXTENSION_HOST_VIEW_SHOULD_CLOSE, + Source<Profile>(host_->profile()), + Details<ExtensionHost>(host_.get())); } - (void)close { |