summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions
diff options
context:
space:
mode:
authorandybons@chromium.org <andybons@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-02 20:59:20 +0000
committerandybons@chromium.org <andybons@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-02 20:59:20 +0000
commitfac15c494ac3cacfcd905e8bc186ef212ad943e3 (patch)
tree5d24e981bb9aec910946a1499e14a33b493502f3 /chrome/browser/extensions
parent8471424148c07642dee2796673feb2d66be75074 (diff)
downloadchromium_src-fac15c494ac3cacfcd905e8bc186ef212ad943e3.zip
chromium_src-fac15c494ac3cacfcd905e8bc186ef212ad943e3.tar.gz
chromium_src-fac15c494ac3cacfcd905e8bc186ef212ad943e3.tar.bz2
[Mac] Make the extension popup a singleton instance to avoid maintaining multiple pointer references to a class that, by design, can only have one popup open at a time.
The bug fixed in this change has to do with PageActionView having a dirty pointer to a popup if it was closed via losing its key state. Once a notification like EXTENSION_HOST_VIEW_SHOULD_CLOSE was fired, then the PageActionView would assume the pointer was valid and call on dirty memory. TEST=none BUG=29492,33590 Review URL: http://codereview.chromium.org/561013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37873 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions')
-rw-r--r--chrome/browser/extensions/browser_action_test_util_mac.mm6
1 files changed, 3 insertions, 3 deletions
diff --git a/chrome/browser/extensions/browser_action_test_util_mac.mm b/chrome/browser/extensions/browser_action_test_util_mac.mm
index 6f13895..46be664 100644
--- a/chrome/browser/extensions/browser_action_test_util_mac.mm
+++ b/chrome/browser/extensions/browser_action_test_util_mac.mm
@@ -50,16 +50,16 @@ std::string BrowserActionTestUtil::GetTooltip(int index) {
}
bool BrowserActionTestUtil::HasPopup() {
- return [GetController(browser_) popup] != nil;
+ return [ExtensionPopupController popup] != nil;
}
gfx::Rect BrowserActionTestUtil::GetPopupBounds() {
- NSRect bounds = [[[GetController(browser_) popup] view] bounds];
+ NSRect bounds = [[[ExtensionPopupController popup] view] bounds];
return gfx::Rect(NSRectToCGRect(bounds));
}
bool BrowserActionTestUtil::HidePopup() {
- ExtensionPopupController* controller = [GetController(browser_) popup];
+ ExtensionPopupController* controller = [ExtensionPopupController popup];
// The window must be gone or we'll fail a unit test with windows left open.
[static_cast<InfoBubbleWindow*>([controller window]) setDelayOnClose:NO];
[controller close];