| Index: chrome/browser/ui/cocoa/browser_window_controller.mm
|
| diff --git a/chrome/browser/ui/cocoa/browser_window_controller.mm b/chrome/browser/ui/cocoa/browser_window_controller.mm
|
| index 4be4668efd342e41070120ca9a5e8290959681db..9687c9799dfe185ef73d0c0e76116f133233f29a 100644
|
| --- a/chrome/browser/ui/cocoa/browser_window_controller.mm
|
| +++ b/chrome/browser/ui/cocoa/browser_window_controller.mm
|
| @@ -38,6 +38,8 @@
|
| #include "chrome/browser/ui/browser_instant_controller.h"
|
| #include "chrome/browser/ui/browser_list.h"
|
| #include "chrome/browser/ui/browser_window_state.h"
|
| +#include "chrome/browser/ui/chrome_bubble_manager.h"
|
| +#include "chrome/browser/ui/chrome_bubble_manager_factory.h"
|
| #import "chrome/browser/ui/cocoa/background_gradient_view.h"
|
| #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h"
|
| #import "chrome/browser/ui/cocoa/bookmarks/bookmark_editor_controller.h"
|
| @@ -68,14 +70,12 @@
|
| #import "chrome/browser/ui/cocoa/tabs/tab_view.h"
|
| #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h"
|
| #import "chrome/browser/ui/cocoa/translate/translate_bubble_controller.h"
|
| -#include "chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa.h"
|
| #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h"
|
| #include "chrome/browser/ui/location_bar/location_bar.h"
|
| #include "chrome/browser/ui/tabs/tab_strip_model.h"
|
| #include "chrome/browser/ui/tabs/tab_strip_model_delegate.h"
|
| #include "chrome/browser/ui/toolbar/encoding_menu_controller.h"
|
| #include "chrome/browser/ui/translate/translate_bubble_model_impl.h"
|
| -#include "chrome/browser/ui/website_settings/permission_bubble_manager.h"
|
| #include "chrome/browser/ui/window_sizer/window_sizer.h"
|
| #include "chrome/common/chrome_switches.h"
|
| #include "chrome/common/extensions/command.h"
|
| @@ -1294,19 +1294,11 @@ using content::WebContents;
|
|
|
| - (void)onActiveTabChanged:(content::WebContents*)oldContents
|
| to:(content::WebContents*)newContents {
|
| - // No need to remove previous bubble. It will close itself.
|
| - PermissionBubbleManager* manager(nullptr);
|
| - if (oldContents) {
|
| - manager = PermissionBubbleManager::FromWebContents(oldContents);
|
| - if (manager)
|
| - manager->HideBubble();
|
| - }
|
| -
|
| - if (newContents) {
|
| - manager = PermissionBubbleManager::FromWebContents(newContents);
|
| - if (manager)
|
| - manager->DisplayPendingRequests(browser_.get());
|
| - }
|
| + ChromeBubbleManager* manager =
|
| + ChromeBubbleManagerFactory::GetForBrowserContext(browser_->profile());
|
| + if (oldContents)
|
| + manager->TabBlur(oldContents);
|
| + manager->TabFocus(newContents);
|
| }
|
|
|
| - (void)zoomChangedForActiveTab:(BOOL)canShowBubble {
|
| @@ -1861,10 +1853,9 @@ using content::WebContents;
|
| object:[translateBubbleController_ window]];
|
| }
|
|
|
| -- (void)dismissPermissionBubble {
|
| - PermissionBubbleManager* manager = [self permissionBubbleManager];
|
| - if (manager)
|
| - manager->HideBubble();
|
| +- (void)dismissBubble {
|
| + ChromeBubbleManagerFactory::GetForBrowserContext(browser_->profile())
|
| + ->UserDismissBubbles([self webContents]);
|
| }
|
|
|
| // Nil out the weak translate bubble controller reference.
|
|
|