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

Unified Diff: chrome/browser/ui/views/passwords/manage_passwords_icon_view.h

Issue 246393004: Password bubble: Introduce a command to open the bubble. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: The bigger picture. Created 6 years, 8 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/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);
};

Powered by Google App Engine
This is Rietveld 408576698