Index: chrome/browser/ui/views/passwords/manage_passwords_icon_view.h |
diff --git a/chrome/browser/ui/views/passwords/manage_passwords_icon_view.h b/chrome/browser/ui/views/passwords/manage_passwords_icon_view.h |
index 7dd791c70f1ef1239f09b2bd97c56715aece9531..981525c35235be54051d81a6185fff3064a35f2b 100644 |
--- a/chrome/browser/ui/views/passwords/manage_passwords_icon_view.h |
+++ b/chrome/browser/ui/views/passwords/manage_passwords_icon_view.h |
@@ -7,42 +7,50 @@ |
#include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h" |
#include "chrome/browser/ui/passwords/manage_passwords_icon.h" |
+#include "chrome/browser/ui/views/location_bar/bubble_icon_view.h" |
#include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
#include "ui/views/controls/image_view.h" |
+class CommandUpdater; |
class ManagePasswordsBubbleUIController; |
// View for the password icon in the Omnibox. |
class ManagePasswordsIconView : public ManagePasswordsIcon, |
- public views::ImageView { |
+ public BubbleIconView { |
public: |
// Clicking on the ManagePasswordsIconView shows a ManagePasswordsBubbleView, |
// which requires the current WebContents. Because the current WebContents |
// changes as the user switches tabs, it cannot be provided in the |
// constructor. Instead, a LocationBarView::Delegate is passed here so that it |
// can be queried for the current WebContents as needed. |
- explicit ManagePasswordsIconView( |
- LocationBarView::Delegate* location_bar_delegate); |
+ ManagePasswordsIconView(LocationBarView::Delegate* location_bar_delegate, |
+ CommandUpdater* command_updater); |
virtual ~ManagePasswordsIconView(); |
// ManagePasswordsIcon: |
+ // |
+ // TODO(mkwst): Remove this once we get rid of the single call to |
+ // ShowBubbleWithoutUserInteraction in ManagePasswordsBubbleUIController. |
virtual void ShowBubbleWithoutUserInteraction() OVERRIDE; |
+ // BubbleIconView: |
+ virtual bool IsBubbleShowing() const OVERRIDE; |
+ virtual void OnExecuting(BubbleIconView::ExecuteSource source) OVERRIDE; |
protected: |
Peter Kasting
2014/04/25 22:12:02
Nit: Newline above this
Mike West
2014/04/28 10:52:56
Done.
|
// ManagePasswordsIcon: |
virtual void SetStateInternal(ManagePasswordsIcon::State state) OVERRIDE; |
private: |
- // views::ImageView: |
- virtual bool GetTooltipText(const gfx::Point& p, |
- base::string16* tooltip) const OVERRIDE; |
- virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; |
- virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; |
- virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; |
- |
// The delegate used to get the currently visible WebContents. |
LocationBarView::Delegate* location_bar_delegate_; |
+ // The updater used to deliver commands to the browser; we'll use this to |
+ // pop open the bubble when necessary. |
+ // |
+ // TODO(mkwst): Remove this once we get rid of the single call to |
+ // ShowBubbleWithoutUserInteraction in ManagePasswordsBubbleUIController. |
+ CommandUpdater* command_updater_; |
+ |
DISALLOW_COPY_AND_ASSIGN(ManagePasswordsIconView); |
}; |