Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(544)

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_controller.mm

Issue 2227513002: MacViews: Reposition permission bubble on browser resize. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/ui/cocoa/browser_window_controller.h" 5 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <numeric> 8 #include <numeric>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1695 matching lines...) Expand 10 before | Expand all | Expand 10 after
1706 // Delegate method called when window is resized. 1706 // Delegate method called when window is resized.
1707 - (void)windowDidResize:(NSNotification*)notification { 1707 - (void)windowDidResize:(NSNotification*)notification {
1708 [self saveWindowPositionIfNeeded]; 1708 [self saveWindowPositionIfNeeded];
1709 1709
1710 // Resize (and possibly move) the status bubble. Note that we may get called 1710 // Resize (and possibly move) the status bubble. Note that we may get called
1711 // when the status bubble does not exist. 1711 // when the status bubble does not exist.
1712 if (statusBubble_) { 1712 if (statusBubble_) {
1713 statusBubble_->UpdateSizeAndPosition(); 1713 statusBubble_->UpdateSizeAndPosition();
1714 } 1714 }
1715 1715
1716 // Reposition the permission bubble if it exists.
1717 PermissionRequestManager* manager = [self permissionRequestManager];
1718 if (manager)
1719 manager->UpdateAnchorPosition();
tapted 2016/08/08 07:10:18 This code fragment is in 3 places now... it's poss
karandeepb 2016/08/08 10:37:29 This is also a bug on stable, though can't seem to
tapted 2016/08/09 01:58:39 Don't know of a bug for it - it's pretty obscure.
karandeepb 2016/08/09 07:51:32 Will file a bug for it.
tapted 2016/08/10 01:27:20 Yah - I think BaseBubbleController's updateAnchor
1720
1716 // The FindBar needs to know its own position to properly detect overlaps 1721 // The FindBar needs to know its own position to properly detect overlaps
1717 // with find results. The position changes whenever the window is resized, 1722 // with find results. The position changes whenever the window is resized,
1718 // and |layoutSubviews| computes the FindBar's position. 1723 // and |layoutSubviews| computes the FindBar's position.
1719 // TODO: calling |layoutSubviews| here is a waste, find a better way to 1724 // TODO: calling |layoutSubviews| here is a waste, find a better way to
1720 // do this. 1725 // do this.
1721 if ([findBarCocoaController_ isFindBarVisible]) 1726 if ([findBarCocoaController_ isFindBarVisible])
1722 [self layoutSubviews]; 1727 [self layoutSubviews];
1723 } 1728 }
1724 1729
1725 // Delegate method called when window did move. (See below for why we don't use 1730 // Delegate method called when window did move. (See below for why we don't use
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
2055 2060
2056 - (NSRect)savedRegularWindowFrame { 2061 - (NSRect)savedRegularWindowFrame {
2057 return savedRegularWindowFrame_; 2062 return savedRegularWindowFrame_;
2058 } 2063 }
2059 2064
2060 - (BOOL)isFullscreenTransitionInProgress { 2065 - (BOOL)isFullscreenTransitionInProgress {
2061 return enteringAppKitFullscreen_ || exitingAppKitFullscreen_; 2066 return enteringAppKitFullscreen_ || exitingAppKitFullscreen_;
2062 } 2067 }
2063 2068
2064 @end // @implementation BrowserWindowController(WindowType) 2069 @end // @implementation BrowserWindowController(WindowType)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698