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

Unified Diff: chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_cocoa.h

Issue 505123002: Revert "Revert of Hook up the Mac password bubble to the browser and add browser tests. (patchset #… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix include for real this time Created 6 years, 4 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/passwords/manage_passwords_bubble_cocoa.h
diff --git a/chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_cocoa.h b/chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_cocoa.h
index 03edd4f7794e25df5964f9a7a8789a7c45e28f71..b91857e9aa8554c2de29347a7d33d1ebe7577605 100644
--- a/chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_cocoa.h
+++ b/chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_cocoa.h
@@ -14,8 +14,13 @@ namespace content {
class WebContents;
}
+namespace chrome {
+void ShowManagePasswordsBubble(content::WebContents* webContents);
+}
+
@class ManagePasswordsBubbleController;
@class ManagePasswordsBubbleCocoaNotificationBridge;
+class ManagePasswordsIcon;
// Cocoa implementation of the platform-independent password bubble interface.
class ManagePasswordsBubbleCocoa : public ManagePasswordsBubble {
@@ -23,26 +28,37 @@ class ManagePasswordsBubbleCocoa : public ManagePasswordsBubble {
// Creates and shows the bubble, which owns itself. Does nothing if the bubble
// is already shown.
static void ShowBubble(content::WebContents* webContents,
- DisplayReason displayReason);
+ DisplayReason displayReason,
+ ManagePasswordsIcon* icon);
// Closes and deletes the bubble.
void Close();
+ // Sets the location bar icon that should be updated with state changes.
+ void SetIcon(ManagePasswordsIcon* icon) { icon_ = icon; }
+
// Accessor for the global bubble.
static ManagePasswordsBubbleCocoa* instance() { return bubble_; }
private:
friend class ManagePasswordsBubbleCocoaTest;
+ friend class ManagePasswordsBubbleTest;
+ friend void chrome::ShowManagePasswordsBubble(
+ content::WebContents* webContents);
// Instance-specific logic. Clients should use the static interface.
ManagePasswordsBubbleCocoa(content::WebContents* webContents,
- DisplayReason displayReason);
+ DisplayReason displayReason,
+ ManagePasswordsIcon* icon);
virtual ~ManagePasswordsBubbleCocoa();
void Show();
// Cleans up state and deletes itself. Called when the bubble is closed.
void OnClose();
+ // The location bar icon corresponding to the bubble.
+ ManagePasswordsIcon* icon_;
+
// Whether there is currently a close operation taking place. Prevents
// multiple attempts to close the window.
bool closing_;

Powered by Google App Engine
This is Rietveld 408576698