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

Unified Diff: chrome/browser/ui/cocoa/passwords/passwords_bubble_controller.mm

Issue 2511043002: [Mac] Omnibox icons active states (Closed)
Patch Set: Fixed Bookmark test Created 4 years, 1 month 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/passwords/passwords_bubble_controller.mm
diff --git a/chrome/browser/ui/cocoa/passwords/passwords_bubble_controller.mm b/chrome/browser/ui/cocoa/passwords/passwords_bubble_controller.mm
index d31cbc0613e6de2a17e50465108cc9e3fe8abb6f..372422842aed3b5af2a3180b438b49f7ef7f1087 100644
--- a/chrome/browser/ui/cocoa/passwords/passwords_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/passwords/passwords_bubble_controller.mm
@@ -10,6 +10,7 @@
#import "chrome/browser/ui/cocoa/info_bubble_view.h"
#import "chrome/browser/ui/cocoa/info_bubble_window.h"
#include "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h"
+#import "chrome/browser/ui/cocoa/location_bar/manage_passwords_decoration.h"
#import "chrome/browser/ui/cocoa/passwords/auto_signin_view_controller.h"
#import "chrome/browser/ui/cocoa/passwords/confirmation_password_saved_view_controller.h"
#import "chrome/browser/ui/cocoa/passwords/manage_passwords_view_controller.h"
@@ -37,6 +38,18 @@
parentWindow:parentWindow
anchoredAt:NSZeroPoint])) {
model_ = model;
+ Browser* browser = chrome::FindBrowserWithWindow([self parentWindow]);
+
+ bool hasLocationBar =
+ browser && browser->SupportsWindowFeature(Browser::FEATURE_LOCATIONBAR);
+
+ if (hasLocationBar) {
+ BrowserWindowController* controller = [BrowserWindowController
+ browserWindowControllerForWindow:parentWindow];
+ decoration_ =
+ [controller locationBarBridge]->manage_passwords_decoration();
+ }
+
[self updateState];
}
return self;
@@ -58,6 +71,10 @@
[super close];
}
+- (LocationBarDecoration*)decorationForBubble {
+ return decoration_;
Robert Sesek 2016/11/28 22:46:59 In all the other DecorationControllers, you don't
spqchan 2016/11/29 17:34:49 Done.
+}
+
- (void)updateState {
// Find the next view controller.
[currentController_ setDelegate:nil];
@@ -108,8 +125,8 @@
if (hasLocationBar) {
BrowserWindowController* controller = [BrowserWindowController
browserWindowControllerForWindow:[self parentWindow]];
- anchorPoint =
- [controller locationBarBridge]->GetManagePasswordsBubblePoint();
+ anchorPoint = [controller locationBarBridge]->GetBubblePointForDecoration(
+ decoration_);
arrow = info_bubble::kTopRight;
} else {
// Center the bubble if there's no location bar.

Powered by Google App Engine
This is Rietveld 408576698