diff options
author | andybons@chromium.org <andybons@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-02 20:59:20 +0000 |
---|---|---|
committer | andybons@chromium.org <andybons@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-02 20:59:20 +0000 |
commit | fac15c494ac3cacfcd905e8bc186ef212ad943e3 (patch) | |
tree | 5d24e981bb9aec910946a1499e14a33b493502f3 /chrome/browser/cocoa/toolbar_controller.mm | |
parent | 8471424148c07642dee2796673feb2d66be75074 (diff) | |
download | chromium_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/cocoa/toolbar_controller.mm')
-rw-r--r-- | chrome/browser/cocoa/toolbar_controller.mm | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/chrome/browser/cocoa/toolbar_controller.mm b/chrome/browser/cocoa/toolbar_controller.mm index 59b3c47..6ffa93e 100644 --- a/chrome/browser/cocoa/toolbar_controller.mm +++ b/chrome/browser/cocoa/toolbar_controller.mm @@ -618,8 +618,7 @@ class PrefObserverBridge : public NotificationObserver { // subtract the threshold width, which represents the space that the // (optional) home button, omnibar, go button and page/wrench buttons take up // when no Browser Actions are displayed. This is to prevent the Browser - // Action buttons from pushing the elements to the left of them too much to - // the left. + // Action buttons from pushing the elements to the left of them too far over. CGFloat availableWidth = std::max(0.0f, curWidth - reloadFrame.origin.x + NSWidth(reloadFrame) - kHideBrowserActionThresholdWidth); @@ -636,7 +635,7 @@ class PrefObserverBridge : public NotificationObserver { delta *= -1; } else if (visibleCount == buttonCount) { // The number of available slots is greater than the number of displayed - // buttons and all buttons are already displayed. + // buttons then all buttons are already displayed. return; } int arrayOffset = hide ? -1 : 0; |