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

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

Issue 2542173002: [Mac] Omnibox icons active states (Closed)
Patch Set: Created 4 years 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..54fa903eec0f8406e436a1f3f197f5cb5d8c6275 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"
@@ -58,6 +59,13 @@
[super close];
}
+- (LocationBarDecoration*)decorationForBubble {
+ BrowserWindowController* controller = [BrowserWindowController
+ browserWindowControllerForWindow:[self parentWindow]];
+ LocationBarViewMac* locationBar = [controller locationBarBridge];
+ return locationBar ? locationBar->manage_passwords_decoration() : nullptr;
+}
+
- (void)updateState {
// Find the next view controller.
[currentController_ setDelegate:nil];
@@ -108,8 +116,8 @@
if (hasLocationBar) {
BrowserWindowController* controller = [BrowserWindowController
browserWindowControllerForWindow:[self parentWindow]];
- anchorPoint =
- [controller locationBarBridge]->GetManagePasswordsBubblePoint();
+ anchorPoint = [controller locationBarBridge]->GetBubblePointForDecoration(
+ [self decorationForBubble]);
arrow = info_bubble::kTopRight;
} else {
// Center the bubble if there's no location bar.
« no previous file with comments | « chrome/browser/ui/cocoa/passwords/passwords_bubble_controller.h ('k') | chrome/browser/ui/cocoa/toolbar/toolbar_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698