summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa
diff options
context:
space:
mode:
authorjrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-13 16:59:33 +0000
committerjrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-13 16:59:33 +0000
commitd85c74e4a170bd6903ce34663f58260563b13dd6 (patch)
tree1626bd0c05cf82cbdccb2c0ac93c909be628df11 /chrome/browser/cocoa
parent15d14dc5a93bdcb508bd2002f593ac8d1a900743 (diff)
downloadchromium_src-d85c74e4a170bd6903ce34663f58260563b13dd6.zip
chromium_src-d85c74e4a170bd6903ce34663f58260563b13dd6.tar.gz
chromium_src-d85c74e4a170bd6903ce34663f58260563b13dd6.tar.bz2
Lock fullscreen chrome on transition from one one bookmark folder to
another. Eliminate transition hazard. BUG=http://crbug.com/53550 TEST=Place 2 bookmark folders on bar. Go fullscreen. Move mouse up so chrome opens. Click on one folder, then scroll down a little. Move mouse to the side (so it's in a position that would NOT trigger the chrome to be open) then quickly go up and click on 2nd folder. If the 2nd folder has the right y position, success! If it's pegged to the top of the screen, fail. Repeat a few times. Review URL: http://codereview.chromium.org/3297024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59227 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa')
-rw-r--r--chrome/browser/cocoa/bookmark_bar_controller.mm16
1 files changed, 16 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/bookmark_bar_controller.mm b/chrome/browser/cocoa/bookmark_bar_controller.mm
index f3a59d6..67d340b 100644
--- a/chrome/browser/cocoa/bookmark_bar_controller.mm
+++ b/chrome/browser/cocoa/bookmark_bar_controller.mm
@@ -2218,6 +2218,17 @@ static BOOL ValueInRangeInclusive(CGFloat low, CGFloat value, CGFloat high) {
// Add a new folder controller as triggered by the given folder button.
- (void)addNewFolderControllerWithParentButton:(BookmarkButton*)parentButton {
+
+ // If doing a close/open, make sure the fullscreen chrome doesn't
+ // have a chance to begin animating away in the middle of things.
+ BrowserWindowController* browserController =
+ [BrowserWindowController browserWindowControllerForView:[self view]];
+ // Confirm we're not re-locking with ourself as an owner before locking.
+ DCHECK([browserController isBarVisibilityLockedForOwner:self] == NO);
+ [browserController lockBarVisibilityForOwner:self
+ withAnimation:NO
+ delay:NO];
+
if (folderController_)
[self closeAllBookmarkFolders];
@@ -2231,6 +2242,11 @@ static BOOL ValueInRangeInclusive(CGFloat low, CGFloat value, CGFloat high) {
// Only BookmarkBarController has this; the
// BookmarkBarFolderController does not.
[self watchForExitEvent:YES];
+
+ // No longer need to hold the lock; the folderController_ now owns it.
+ [browserController releaseBarVisibilityForOwner:self
+ withAnimation:NO
+ delay:NO];
}
- (void)openAll:(const BookmarkNode*)node