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

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

Issue 256333003: Revert of Password bubble: Introduce a command to open the bubble. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 efcef5f034d46a5c0d648f70dcf1aa142992e29a..7dd791c70f1ef1239f09b2bd97c56715aece9531 100644
--- a/chrome/browser/ui/views/passwords/manage_passwords_icon_view.h
+++ b/chrome/browser/ui/views/passwords/manage_passwords_icon_view.h
@@ -7,59 +7,41 @@
#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 BubbleIconView {
+ public views::ImageView {
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.
- ManagePasswordsIconView(LocationBarView::Delegate* location_bar_delegate,
- CommandUpdater* command_updater);
+ explicit ManagePasswordsIconView(
+ LocationBarView::Delegate* location_bar_delegate);
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;
-
-#if defined(UNIT_TEST)
- int icon_id() const { return icon_id_; }
- int tooltip_text_id() const { return tooltip_text_id_; }
-#endif
protected:
// ManagePasswordsIcon:
- virtual void UpdateVisibleUI() OVERRIDE;
+ 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_;
-
- // The ID of the icon and text resources that are currently displayed.
- int icon_id_;
- int tooltip_text_id_;
DISALLOW_COPY_AND_ASSIGN(ManagePasswordsIconView);
};

Powered by Google App Engine
This is Rietveld 408576698