| 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 cddca0ecf9838acc947a8625373a9cb033c75b45..244f01fc1a4f1da7f40e1211d57e2d13a50e7042 100644
|
| --- a/chrome/browser/ui/cocoa/browser_window_controller.mm
|
| +++ b/chrome/browser/ui/cocoa/browser_window_controller.mm
|
| @@ -64,12 +64,14 @@
|
| #import "chrome/browser/ui/cocoa/tabs/tab_strip_view.h"
|
| #import "chrome/browser/ui/cocoa/tabs/tab_view.h"
|
| #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h"
|
| +#include "chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa.h"
|
| #include "chrome/browser/ui/fullscreen/fullscreen_controller.h"
|
| #include "chrome/browser/ui/omnibox/location_bar.h"
|
| #include "chrome/browser/ui/tabs/dock_info.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/website_settings/permission_bubble_manager.h"
|
| #include "chrome/browser/ui/window_sizer/window_sizer.h"
|
| #include "chrome/common/chrome_switches.h"
|
| #include "chrome/common/profile_management_switches.h"
|
| @@ -423,6 +425,9 @@ enum {
|
| // Create the bridge for the status bubble.
|
| statusBubble_ = new StatusBubbleMac([self window], self);
|
|
|
| + // Create the permissions bubble.
|
| + permissionBubbleCocoa_.reset(new PermissionBubbleCocoa([self window]));
|
| +
|
| // Register for application hide/unhide notifications.
|
| [[NSNotificationCenter defaultCenter]
|
| addObserver:self
|
| @@ -1592,6 +1597,14 @@ enum {
|
|
|
| [infoBarContainerController_ changeWebContents:contents];
|
|
|
| + // No need to remove previous bubble. It will close itself.
|
| + // TODO(leng): The PermissionBubbleManager for the previous contents should
|
| + // have SetView(NULL) called. Fix this when the previous contents are
|
| + // available here or move to BrowserWindowCocoa::OnActiveTabChanged().
|
| + // crbug.com/340720
|
| + PermissionBubbleManager::FromWebContents(contents)->SetView(
|
| + permissionBubbleCocoa_.get());
|
| +
|
| // Must do this after bookmark and infobar updates to avoid
|
| // unnecesary resize in contents.
|
| [devToolsController_ updateDevToolsForWebContents:contents
|
|
|