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

Side by Side Diff: chrome/browser/ui/views/autofill/password_generation_popup_view_views.h

Issue 147533005: [Password Generation] Update UI to match final mocks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@replace_password_generation_ui
Patch Set: Created 6 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_VIEWS_AUTOFILL_PASSWORD_GENERATION_POPUP_VIEW_VIEWS_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_AUTOFILL_PASSWORD_GENERATION_POPUP_VIEW_VIEWS_H_
6 #define CHROME_BROWSER_UI_VIEWS_AUTOFILL_PASSWORD_GENERATION_POPUP_VIEW_VIEWS_H_ 6 #define CHROME_BROWSER_UI_VIEWS_AUTOFILL_PASSWORD_GENERATION_POPUP_VIEW_VIEWS_H_
7 7
8 #include "chrome/browser/ui/autofill/password_generation_popup_view.h" 8 #include "chrome/browser/ui/autofill/password_generation_popup_view.h"
9 #include "chrome/browser/ui/views/autofill/autofill_popup_base_view.h" 9 #include "chrome/browser/ui/views/autofill/autofill_popup_base_view.h"
10 #include "ui/views/controls/styled_label_listener.h" 10 #include "ui/views/controls/styled_label_listener.h"
11 11
12 namespace views { 12 namespace views {
13 class Label; 13 class StyledLabel;
14 class View;
14 } 15 }
15 16
16 namespace autofill { 17 namespace autofill {
17 18
18 class PasswordGenerationPopupController; 19 class PasswordGenerationPopupController;
19 20
20 class PasswordGenerationPopupViewViews : public AutofillPopupBaseView, 21 class PasswordGenerationPopupViewViews : public AutofillPopupBaseView,
21 public PasswordGenerationPopupView, 22 public PasswordGenerationPopupView,
22 public views::StyledLabelListener { 23 public views::StyledLabelListener {
23 public: 24 public:
24 PasswordGenerationPopupViewViews( 25 PasswordGenerationPopupViewViews(
25 PasswordGenerationPopupController* controller, 26 PasswordGenerationPopupController* controller,
26 views::Widget* observing_widget); 27 views::Widget* observing_widget);
27 28
28 // PasswordGenerationPopupView implementation 29 // PasswordGenerationPopupView implementation
29 virtual void Show() OVERRIDE; 30 virtual void Show() OVERRIDE;
30 virtual void Hide() OVERRIDE; 31 virtual void Hide() OVERRIDE;
31 virtual void UpdateBoundsAndRedrawPopup() OVERRIDE; 32 virtual void UpdateBoundsAndRedrawPopup() OVERRIDE;
33 virtual void PasswordSelectionUpdated() OVERRIDE;
32 34
33 private: 35 private:
34 virtual ~PasswordGenerationPopupViewViews(); 36 virtual ~PasswordGenerationPopupViewViews();
35 37
38 // Helper function to create |password_view_|.
39 void CreatePasswordView();
40
36 // views:Views implementation. 41 // views:Views implementation.
42 virtual void Layout() OVERRIDE;
37 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; 43 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
38 44
39 // views::StyledLabelListener implementation 45 // views::StyledLabelListener implementation
40 virtual void StyledLabelLinkClicked(const gfx::Range& range, 46 virtual void StyledLabelLinkClicked(const gfx::Range& range,
41 int event_flags) OVERRIDE; 47 int event_flags) OVERRIDE;
42 48
43 // Label for the generated password. Used to change the background color when 49 // Sub views. Used to change bounds when updating. Weak references.
44 // the password is selected/deselected. Weak reference. 50 views::View* password_view_;
45 views::Label* password_label_; 51 views::StyledLabel* help_label_;
46 52
47 // Controller for this view. Weak reference. 53 // Controller for this view. Weak reference.
48 PasswordGenerationPopupController* controller_; 54 PasswordGenerationPopupController* controller_;
49 55
50 DISALLOW_COPY_AND_ASSIGN(PasswordGenerationPopupViewViews); 56 DISALLOW_COPY_AND_ASSIGN(PasswordGenerationPopupViewViews);
51 }; 57 };
52 58
53 } // namespace autofill 59 } // namespace autofill
54 60
55 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_PASSWORD_GENERATION_POPUP_VIEW_VIEWS _H_ 61 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_PASSWORD_GENERATION_POPUP_VIEW_VIEWS _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698