1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/extensions/extension_view_host_mac.h"
7 #import "base/mac/foundation_util.h"
8 #import "chrome/browser/ui/cocoa/chrome_event_processing_window.h"
9 #import "chrome/browser/ui/cocoa/extensions/extension_popup_controller.h"
10 #import "chrome/browser/ui/cocoa/info_bubble_window.h"
12 namespace extensions {
14 ExtensionViewHostMac::~ExtensionViewHostMac() {
15 // If there is a popup open for this host's extension, close it.
16 ExtensionPopupController* popup = [ExtensionPopupController popup];
17 InfoBubbleWindow* window =
18 base::mac::ObjCCast<InfoBubbleWindow>([popup window]);
19 if ([window isVisible] && [popup extensionViewHost] == this) {
20 [window setAllowedAnimations:info_bubble::kAnimateNone];
25 } // namespace extensions