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

Unified Diff: chrome/browser/ui/views/password_generation_bubble_view.h

Issue 10919111: Update Windows UI for the Password Generation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix a build problem. Created 8 years, 3 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/password_generation_bubble_view.h
diff --git a/chrome/browser/ui/views/password_generation_bubble_view.h b/chrome/browser/ui/views/password_generation_bubble_view.h
index 6010d0fce1005882dcbeef67a9add4bf99a3c59f..d8c78534577e7f3ad55b88663a8869c9501c93cf 100644
--- a/chrome/browser/ui/views/password_generation_bubble_view.h
+++ b/chrome/browser/ui/views/password_generation_bubble_view.h
@@ -9,7 +9,6 @@
#include "ui/gfx/rect.h"
#include "ui/views/bubble/bubble_delegate.h"
#include "ui/views/controls/button/button.h"
-#include "ui/views/controls/link_listener.h"
#include "ui/views/view.h"
#include "webkit/forms/password_form.h"
@@ -23,6 +22,8 @@ class RenderViewHost;
}
namespace views {
+class ImageButton;
+class Label;
class TextButton;
class Textfield;
}
@@ -34,18 +35,22 @@ class PasswordManager;
// If the generated password is accepted by the user, the renderer associated
// with |render_view_host| and the |password_manager| are informed.
class PasswordGenerationBubbleView : public views::BubbleDelegateView,
- public views::ButtonListener,
- public views::LinkListener {
+ public views::ButtonListener {
public:
- PasswordGenerationBubbleView(const gfx::Rect& anchor_rect,
- const webkit::forms::PasswordForm& form,
+ PasswordGenerationBubbleView(const webkit::forms::PasswordForm& form,
+ const gfx::Rect& anchor_rect,
views::View* anchor_view,
content::RenderViewHost* render_view_host,
+ PasswordManager* password_manager,
autofill::PasswordGenerator* password_generator,
content::PageNavigator* navigator,
- PasswordManager* password_manager);
+ ui::ThemeProvider* theme_provider);
virtual ~PasswordGenerationBubbleView();
+ // views::View
+ virtual gfx::Size GetPreferredSize() OVERRIDE;
+ virtual void Layout() OVERRIDE;
+
private:
// views::BubbleDelegateView
virtual void Init() OVERRIDE;
@@ -55,25 +60,28 @@ class PasswordGenerationBubbleView : public views::BubbleDelegateView,
virtual void ButtonPressed(views::Button* sender,
const ui::Event& event) OVERRIDE;
- // views::LinkListener
- virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE;
-
// views::WidgetDelegate
virtual views::View* GetInitiallyFocusedView() OVERRIDE;
// Subviews
+ views::Label* title_label_;
views::TextButton* accept_button_;
- views::Textfield* text_field_;
-
- // Location that the bubble points to
- gfx::Rect anchor_rect_;
+ views::Textfield* textfield_;
+ views::ImageButton* regenerate_button_;
+ views::View* textfield_wrapper_;
// The form associated with the password field(s) that we are generated.
webkit::forms::PasswordForm form_;
+ // Location that the bubble points to
+ gfx::Rect anchor_rect_;
+
// RenderViewHost associated with the button that spawned this bubble.
content::RenderViewHost* render_view_host_;
+ // PasswordManager associated with this tab.
+ PasswordManager* password_manager_;
+
// Object to generate passwords. The class won't take the ownership of it.
autofill::PasswordGenerator* password_generator_;
@@ -81,8 +89,8 @@ class PasswordGenerationBubbleView : public views::BubbleDelegateView,
// within this UI.
content::PageNavigator* navigator_;
- // PasswordManager associated with this tab.
- PasswordManager* password_manager_;
+ // Theme provider used to draw the regenerate button.
+ ui::ThemeProvider* theme_provider_;
DISALLOW_COPY_AND_ASSIGN(PasswordGenerationBubbleView);
};
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/browser/ui/views/password_generation_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698