Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2737)

Unified Diff: chrome/browser/ui/cocoa/page_info/page_info_bubble_controller.mm

Issue 2851663002: [Mac] Fix for Page Info Bubble (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/page_info/page_info_bubble_controller.mm
diff --git a/chrome/browser/ui/cocoa/page_info/page_info_bubble_controller.mm b/chrome/browser/ui/cocoa/page_info/page_info_bubble_controller.mm
index 4f50b6dacdb108c9616c69e78856bd9939a00038..a726f83a9a5ce0b082ac5ebcac70a1481093d868 100644
--- a/chrome/browser/ui/cocoa/page_info/page_info_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/page_info/page_info_bubble_controller.mm
@@ -19,6 +19,7 @@
#import "chrome/browser/ui/cocoa/browser_window_controller.h"
#import "chrome/browser/ui/cocoa/info_bubble_view.h"
#import "chrome/browser/ui/cocoa/info_bubble_window.h"
+#import "chrome/browser/ui/cocoa/location_bar/location_bar_decoration.h"
#import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h"
#import "chrome/browser/ui/cocoa/page_info/permission_selector_button.h"
#include "chrome/browser/ui/page_info/permission_menu_model.h"
@@ -241,10 +242,24 @@ bool IsInternalURL(const GURL& url) {
return self;
}
-- (LocationBarDecoration*)decorationForBubble {
+- (void)showWindow:(id)sender {
BrowserWindowController* controller = [[self parentWindow] windowController];
- LocationBarViewMac* location_bar = [controller locationBarBridge];
- return location_bar ? location_bar->GetPageInfoDecoration() : nullptr;
+ LocationBarViewMac* locationBar = [controller locationBarBridge];
+ if (locationBar) {
+ decoration_ = locationBar->GetPageInfoDecoration();
+ decoration_->SetActive(true);
+ }
+
+ [super showWindow:sender];
+}
+
+- (void)close {
+ if (decoration_) {
+ decoration_->SetActive(false);
+ decoration_ = nullptr;
+ }
+
+ [super close];
}
- (Profile*)profile {

Powered by Google App Engine
This is Rietveld 408576698