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

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: Merge 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;
32 33
33 private: 34 private:
34 virtual ~PasswordGenerationPopupViewViews(); 35 virtual ~PasswordGenerationPopupViewViews();
35 36
37 // Helper function to create |password_view_|.
38 void CreatePasswordView();
39
36 // views:Views implementation. 40 // views:Views implementation.
37 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; 41 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
38 42
39 // views::StyledLabelListener implementation 43 // views::StyledLabelListener implementation
40 virtual void StyledLabelLinkClicked(const gfx::Range& range, 44 virtual void StyledLabelLinkClicked(const gfx::Range& range,
41 int event_flags) OVERRIDE; 45 int event_flags) OVERRIDE;
42 46
43 // Label for the generated password. Used to change the background color when 47 // Sub views. Used to change bounds when updating. Weak references.
44 // the password is selected/deselected. Weak reference. 48 views::View* password_view_;
45 views::Label* password_label_; 49 views::StyledLabel* help_label_;
46 50
47 // Controller for this view. Weak reference. 51 // Controller for this view. Weak reference.
48 PasswordGenerationPopupController* controller_; 52 PasswordGenerationPopupController* controller_;
49 53
50 DISALLOW_COPY_AND_ASSIGN(PasswordGenerationPopupViewViews); 54 DISALLOW_COPY_AND_ASSIGN(PasswordGenerationPopupViewViews);
51 }; 55 };
52 56
53 } // namespace autofill 57 } // namespace autofill
54 58
55 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_PASSWORD_GENERATION_POPUP_VIEW_VIEWS _H_ 59 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_PASSWORD_GENERATION_POPUP_VIEW_VIEWS _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698