| 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 a215a73d6eb487085a716327e03e6832c9df2cc8..7cfe68b3b4359417392799eb9ceab4f91b9c6859 100644
|
| --- a/chrome/browser/ui/views/passwords/manage_passwords_icon_view.h
|
| +++ b/chrome/browser/ui/views/passwords/manage_passwords_icon_view.h
|
| @@ -9,6 +9,7 @@
|
| #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.
|
| @@ -19,8 +20,8 @@ class ManagePasswordsIconView : public views::ImageView {
|
| // 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();
|
|
|
| // Updates the image and its tooltip appropriately, hiding or showing the icon
|
| @@ -29,12 +30,20 @@ class ManagePasswordsIconView : public views::ImageView {
|
| ManagePasswordsBubbleUIController* manage_passwords_bubble_ui_controller);
|
|
|
| // Shows a bubble from the icon if a password form was submitted.
|
| + //
|
| + // TODO(mkwst): This really, really, really shouldn't be part of the icon.
|
| + // Move the functionality to an appropriate controller (perhaps
|
| + // ManagePasswordsBubbleUIController, or whatever we end up renaming it to as
|
| + // part of http://crbug.com/365678).
|
| void ShowBubbleIfNeeded(
|
| ManagePasswordsBubbleUIController* manage_passwords_bubble_ui_controller);
|
|
|
| void SetTooltip(bool password_to_be_saved);
|
|
|
| private:
|
| + // TODO(mkwst): Throw all of this away once we migrate to BubbleIconView as
|
| + // part of http://crbug.com/365678.
|
| + //
|
| // views::ImageView:
|
| virtual bool GetTooltipText(const gfx::Point& p,
|
| base::string16* tooltip) const OVERRIDE;
|
| @@ -45,6 +54,10 @@ class ManagePasswordsIconView : public views::ImageView {
|
| // 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.
|
| + CommandUpdater* command_updater_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(ManagePasswordsIconView);
|
| };
|
|
|
|
|