bridge:this];
}
- LocationBarViewMac* location_bar =
- [[parent_window_ windowController] locationBarBridge];
- NSPoint anchor = location_bar->GetPageInfoBubblePoint();
- [bubbleController_ showAtAnchor:[parent_window_ convertBaseToScreen:anchor]
+ [bubbleController_ showAtAnchor:GetAnchorPoint()
withDelegate:delegate_
forRequests:requests
acceptStates:accept_state
[bubbleController_ close];
}
+bool PermissionBubbleCocoa::IsVisible() {
+ return bubbleController_ != nil;
+}
+
void PermissionBubbleCocoa::SetDelegate(Delegate* delegate) {
if (delegate_ == delegate)
return;
void PermissionBubbleCocoa::OnBubbleClosing() {
bubbleController_ = nil;
}
+
+NSPoint PermissionBubbleCocoa::GetAnchorPoint() {
+ LocationBarViewMac* location_bar =
+ [[parent_window_ windowController] locationBarBridge];
+ NSPoint anchor = location_bar->GetPageInfoBubblePoint();
+ return [parent_window_ convertBaseToScreen:anchor];
+}
+
+NSWindow* PermissionBubbleCocoa::window() {
+ return [bubbleController_ window];
+}