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

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

Issue 390503003: Enables permission bubbles to remain visible during fulscreen on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix tests 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
Index: chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa.mm
diff --git a/chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa.mm b/chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa.mm
index 1d67b3cedffdb6280760f5c27215b474202d9af7..6e2bb9c5dbac3632ba044036aaacdc66eb7d6b20 100644
--- a/chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa.mm
+++ b/chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa.mm
@@ -31,10 +31,7 @@ void PermissionBubbleCocoa::Show(
bridge:this];
}
- LocationBarViewMac* location_bar =
- [[parent_window_ windowController] locationBarBridge];
- NSPoint anchor = location_bar->GetPageInfoBubblePoint();
- [bubbleController_ showAtAnchor:[parent_window_ convertBaseToScreen:anchor]
+ [bubbleController_ showAtAnchor:AnchorPoint()
withDelegate:delegate_
forRequests:requests
acceptStates:accept_state
@@ -45,6 +42,10 @@ void PermissionBubbleCocoa::Hide() {
[bubbleController_ close];
}
+bool PermissionBubbleCocoa::IsVisible() {
+ return bubbleController_ != nil;
+}
+
void PermissionBubbleCocoa::SetDelegate(Delegate* delegate) {
if (delegate_ == delegate)
return;
@@ -62,3 +63,14 @@ bool PermissionBubbleCocoa::CanAcceptRequestUpdate() {
void PermissionBubbleCocoa::OnBubbleClosing() {
bubbleController_ = nil;
}
+
+NSPoint PermissionBubbleCocoa::AnchorPoint() {
+ LocationBarViewMac* location_bar =
+ [[parent_window_ windowController] locationBarBridge];
+ NSPoint anchor = location_bar->GetPageInfoBubblePoint();
+ return [parent_window_ convertBaseToScreen:anchor];
+}
+
+NSWindow* PermissionBubbleCocoa::window() {
+ return [bubbleController_ window];
+}

Powered by Google App Engine
This is Rietveld 408576698