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

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

Issue 342833002: [Password Generation] Update Aura UI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
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/gfx/font_list.h"
10 #include "ui/views/controls/styled_label_listener.h" 11 #include "ui/views/controls/styled_label_listener.h"
11 12
12 namespace views { 13 namespace views {
13 class StyledLabel; 14 class StyledLabel;
14 class View; 15 class View;
15 } 16 }
16 17
17 namespace autofill { 18 namespace autofill {
18 19
19 class PasswordGenerationPopupController; 20 class PasswordGenerationPopupController;
20 21
21 class PasswordGenerationPopupViewViews : public AutofillPopupBaseView, 22 class PasswordGenerationPopupViewViews : public AutofillPopupBaseView,
22 public PasswordGenerationPopupView, 23 public PasswordGenerationPopupView,
23 public views::StyledLabelListener { 24 public views::StyledLabelListener {
24 public: 25 public:
25 PasswordGenerationPopupViewViews( 26 PasswordGenerationPopupViewViews(
26 PasswordGenerationPopupController* controller, 27 PasswordGenerationPopupController* controller,
27 views::Widget* observing_widget); 28 views::Widget* observing_widget);
28 29
29 // PasswordGenerationPopupView implementation 30 // PasswordGenerationPopupView implementation
30 virtual void Show() OVERRIDE; 31 virtual void Show() OVERRIDE;
31 virtual void Hide() OVERRIDE; 32 virtual void Hide() OVERRIDE;
33 virtual gfx::Size GetBounds() OVERRIDE;
32 virtual void UpdateBoundsAndRedrawPopup() OVERRIDE; 34 virtual void UpdateBoundsAndRedrawPopup() OVERRIDE;
33 virtual void PasswordSelectionUpdated() OVERRIDE; 35 virtual void PasswordSelectionUpdated() OVERRIDE;
36 virtual bool IsPointInPasswordBounds(const gfx::Point& point) OVERRIDE;
34 37
35 private: 38 private:
36 virtual ~PasswordGenerationPopupViewViews(); 39 virtual ~PasswordGenerationPopupViewViews();
37 40
38 // Helper function to create |password_view_|. 41 // Helper function to create |password_view_|.
39 void CreatePasswordView(); 42 void CreatePasswordView();
40 43
41 // views:Views implementation. 44 // views:Views implementation.
42 virtual void Layout() OVERRIDE; 45 virtual void Layout() OVERRIDE;
43 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; 46 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
44 47
45 // views::StyledLabelListener implementation 48 // views::StyledLabelListener implementation
46 virtual void StyledLabelLinkClicked(const gfx::Range& range, 49 virtual void StyledLabelLinkClicked(const gfx::Range& range,
47 int event_flags) OVERRIDE; 50 int event_flags) OVERRIDE;
48 51
49 // Sub views. Used to change bounds when updating. Weak references. 52 // Sub views. Used to change bounds when updating. Weak references.
50 views::View* password_view_; 53 views::View* password_view_;
51 views::StyledLabel* help_label_; 54 views::StyledLabel* help_label_;
52 55
56 // Fonts to use.
57 gfx::FontList font_list_;
58
59 // Size of the divider between the password and the help text.
60 gfx::Rect divider_bounds_;
61
53 // Controller for this view. Weak reference. 62 // Controller for this view. Weak reference.
54 PasswordGenerationPopupController* controller_; 63 PasswordGenerationPopupController* controller_;
55 64
56 DISALLOW_COPY_AND_ASSIGN(PasswordGenerationPopupViewViews); 65 DISALLOW_COPY_AND_ASSIGN(PasswordGenerationPopupViewViews);
57 }; 66 };
58 67
59 } // namespace autofill 68 } // namespace autofill
60 69
61 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_PASSWORD_GENERATION_POPUP_VIEW_VIEWS _H_ 70 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_PASSWORD_GENERATION_POPUP_VIEW_VIEWS _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698