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

Unified Diff: chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.mm

Issue 390553003: Re-anchors the permission bubble when its parent window has moved. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bubble_in_fullscreen
Patch Set: GetAnchorPoint, not AnchorPoint Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.mm
diff --git a/chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.mm b/chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.mm
index 969e15bb0565f4525cc11553306ba252f86581ac..404b44dda07061b4510c89492399d3859c944ddf 100644
--- a/chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.mm
@@ -244,6 +244,11 @@ class MenuDelegate : public ui::SimpleMenuModel::Delegate {
[self setShouldOpenAsKeyWindow:NO];
[[self bubble] setArrowLocation:info_bubble::kTopLeft];
bridge_ = bridge;
+ NSNotificationCenter* center = [NSNotificationCenter defaultCenter];
+ [center addObserver:self
+ selector:@selector(parentWindowDidMove:)
+ name:NSWindowDidMoveNotification
+ object:parentWindow];
}
return self;
}
@@ -262,6 +267,11 @@ class MenuDelegate : public ui::SimpleMenuModel::Delegate {
[self setAnchorPoint:bridge_->GetAnchorPoint()];
}
+- (void)parentWindowDidMove:(NSNotification*)notification {
+ DCHECK(bridge_);
+ [self setAnchorPoint:bridge_->GetAnchorPoint()];
+}
+
- (void)showAtAnchor:(NSPoint)anchorPoint
withDelegate:(PermissionBubbleView::Delegate*)delegate
forRequests:(const std::vector<PermissionBubbleRequest*>&)requests
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698