Chromium Code Reviews| 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..9ca62997731fcd1d057788e6fb4fb1b1b083e1f1 100644 |
| --- a/chrome/browser/ui/cocoa/browser_window_controller.mm |
| +++ b/chrome/browser/ui/cocoa/browser_window_controller.mm |
| @@ -54,6 +54,7 @@ |
| #import "chrome/browser/ui/cocoa/infobars/infobar_container_controller.h" |
| #import "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.h" |
| #import "chrome/browser/ui/cocoa/nsview_additions.h" |
| +#include "chrome/browser/ui/cocoa/permission_bubble_cocoa.h" |
| #import "chrome/browser/ui/cocoa/presentation_mode_controller.h" |
| #import "chrome/browser/ui/cocoa/status_bubble_mac.h" |
| #import "chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.h" |
| @@ -70,6 +71,7 @@ |
| #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,10 @@ enum { |
| [infoBarContainerController_ changeWebContents:contents]; |
| + // No need to remove previous bubble. It will close itself. |
| + PermissionBubbleManager::FromWebContents(contents)->SetView( |
|
groby-ooo-7-16
2014/01/31 22:31:51
Is it ok for the PBM to not have its view NULLED o
leng
2014/02/03 22:38:04
It would be safer to NULL out view for the previou
groby-ooo-7-16
2014/02/04 02:39:29
Ugh. I missed that we only get the new contents. O
leng
2014/02/04 21:48:22
I filed a bug, and added a comment.
We'll see what
|
| + permissionBubbleCocoa_.get()); |
| + |
| // Must do this after bookmark and infobar updates to avoid |
| // unnecesary resize in contents. |
| [devToolsController_ updateDevToolsForWebContents:contents |