| 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 2a90ea519097e21ac27b8f267a61e29934775731..69aa3a0bbacc4231d27dc5fcd172324f36e2910a 100644
|
| --- a/chrome/browser/ui/cocoa/browser_window_controller.mm
|
| +++ b/chrome/browser/ui/cocoa/browser_window_controller.mm
|
| @@ -64,11 +64,13 @@
|
| #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/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"
|
| @@ -419,6 +421,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
|
| @@ -1626,6 +1631,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
|
|
|