Index: chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h |
diff --git a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h |
index bda7182fa2515deb051a27c9d9abdd5d8b8cb6d8..ac26b981d121f388a05bfef3d837510b3496ffc2 100644 |
--- a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h |
+++ b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h |
@@ -6,8 +6,7 @@ |
#define CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_VIEW_H_ |
#include "base/basictypes.h" |
-#include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h" |
-#include "components/password_manager/core/browser/password_manager_metrics_util.h" |
+#include "chrome/browser/ui/passwords/manage_passwords_bubble.h" |
#include "ui/views/bubble/bubble_delegate.h" |
#include "ui/views/controls/button/button.h" |
#include "ui/views/controls/combobox/combobox.h" |
@@ -27,23 +26,19 @@ class LabelButton; |
class GridLayout; |
} |
-class ManagePasswordsBubbleView : public views::BubbleDelegateView, |
+class ManagePasswordsBubbleView : public ManagePasswordsBubble, |
+ public views::BubbleDelegateView, |
public views::ButtonListener, |
public views::ComboboxListener, |
public views::LinkListener { |
public: |
- enum FieldType { USERNAME_FIELD, PASSWORD_FIELD }; |
- |
- enum BubbleDisplayReason { AUTOMATIC = 0, USER_ACTION, NUM_DISPLAY_REASONS }; |
- |
// Shows the bubble. |
static void ShowBubble(content::WebContents* web_contents, |
ManagePasswordsIconView* icon_view, |
- BubbleDisplayReason reason); |
+ DisplayReason reason); |
// Closes any existing bubble. |
- static void CloseBubble( |
- password_manager::metrics_util::UIDismissalReason reason); |
+ static void CloseBubble(); |
// Whether the bubble is currently showing. |
static bool IsShowing(); |
@@ -69,7 +64,7 @@ class ManagePasswordsBubbleView : public views::BubbleDelegateView, |
ManagePasswordsBubbleView(content::WebContents* web_contents, |
views::View* anchor_view, |
ManagePasswordsIconView* icon_view, |
- BubbleDisplayReason reason); |
+ DisplayReason reason); |
virtual ~ManagePasswordsBubbleView(); |
// Construct an appropriate ColumnSet for the given |type|, and add it |
@@ -82,7 +77,17 @@ class ManagePasswordsBubbleView : public views::BubbleDelegateView, |
// bubble, this must be called after the bubble is created. |
void AdjustForFullscreen(const gfx::Rect& screen_bounds); |
- void Close(password_manager::metrics_util::UIDismissalReason reason); |
+ // Close the bubble. |
+ void Close(); |
+ |
+ // Close the bubble without triggering UMA logging. We need this for the |
+ // moment, as the current implementation can close the bubble without user |
+ // interaction; we want to ensure that doesn't show up as a user action in |
+ // our counts. |
+ // |
+ // TODO(mkwst): Throw this away once the icon is no longer responsible for |
+ // creating the bubble. |
+ void CloseWithoutLogging(); |
// views::BubbleDelegateView: |
virtual void Init() OVERRIDE; |
@@ -103,7 +108,6 @@ class ManagePasswordsBubbleView : public views::BubbleDelegateView, |
// shown twice at the same time. |
static ManagePasswordsBubbleView* manage_passwords_bubble_; |
- ManagePasswordsBubbleModel* manage_passwords_bubble_model_; |
ManagePasswordsIconView* icon_view_; |
// The buttons that are shown in the bubble. |
@@ -113,9 +117,6 @@ class ManagePasswordsBubbleView : public views::BubbleDelegateView, |
views::Link* manage_link_; |
views::LabelButton* done_button_; |
- // We track the dismissal reason so we can log it correctly in the destructor. |
- password_manager::metrics_util::UIDismissalReason dismissal_reason_; |
- |
DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleView); |
}; |