OLD | NEW |
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/gfx/font_list.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 | 21 |
22 class PasswordGenerationPopupViewViews : public AutofillPopupBaseView, | 22 class PasswordGenerationPopupViewViews : public AutofillPopupBaseView, |
23 public PasswordGenerationPopupView, | 23 public PasswordGenerationPopupView, |
24 public views::StyledLabelListener { | 24 public views::StyledLabelListener { |
25 public: | 25 public: |
26 PasswordGenerationPopupViewViews( | 26 PasswordGenerationPopupViewViews( |
27 PasswordGenerationPopupController* controller, | 27 PasswordGenerationPopupController* controller, |
28 views::Widget* observing_widget); | 28 views::Widget* observing_widget); |
29 | 29 |
30 // PasswordGenerationPopupView implementation | 30 // PasswordGenerationPopupView implementation |
31 virtual void Show() OVERRIDE; | 31 virtual void Show() override; |
32 virtual void Hide() OVERRIDE; | 32 virtual void Hide() override; |
33 virtual gfx::Size GetPreferredSizeOfPasswordView() OVERRIDE; | 33 virtual gfx::Size GetPreferredSizeOfPasswordView() override; |
34 virtual void UpdateBoundsAndRedrawPopup() OVERRIDE; | 34 virtual void UpdateBoundsAndRedrawPopup() override; |
35 virtual void PasswordSelectionUpdated() OVERRIDE; | 35 virtual void PasswordSelectionUpdated() override; |
36 virtual bool IsPointInPasswordBounds(const gfx::Point& point) OVERRIDE; | 36 virtual bool IsPointInPasswordBounds(const gfx::Point& point) override; |
37 | 37 |
38 private: | 38 private: |
39 // Helper class to do layout of the password portion of the popup. | 39 // Helper class to do layout of the password portion of the popup. |
40 class PasswordBox; | 40 class PasswordBox; |
41 | 41 |
42 virtual ~PasswordGenerationPopupViewViews(); | 42 virtual ~PasswordGenerationPopupViewViews(); |
43 | 43 |
44 // Helper function to create |password_view_|. | 44 // Helper function to create |password_view_|. |
45 void CreatePasswordView(); | 45 void CreatePasswordView(); |
46 | 46 |
47 // views:Views implementation. | 47 // views:Views implementation. |
48 virtual void Layout() OVERRIDE; | 48 virtual void Layout() override; |
49 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 49 virtual void OnPaint(gfx::Canvas* canvas) override; |
50 | 50 |
51 // views::StyledLabelListener implementation | 51 // views::StyledLabelListener implementation |
52 virtual void StyledLabelLinkClicked(const gfx::Range& range, | 52 virtual void StyledLabelLinkClicked(const gfx::Range& range, |
53 int event_flags) OVERRIDE; | 53 int event_flags) override; |
54 | 54 |
55 // Sub views. Used to change bounds when updating. Weak references. | 55 // Sub views. Used to change bounds when updating. Weak references. |
56 PasswordBox* password_view_; | 56 PasswordBox* password_view_; |
57 views::StyledLabel* help_label_; | 57 views::StyledLabel* help_label_; |
58 | 58 |
59 // Fonts to use. | 59 // Fonts to use. |
60 gfx::FontList font_list_; | 60 gfx::FontList font_list_; |
61 | 61 |
62 // Size of the divider between the password and the help text. | 62 // Size of the divider between the password and the help text. |
63 gfx::Rect divider_bounds_; | 63 gfx::Rect divider_bounds_; |
64 | 64 |
65 // Controller for this view. Weak reference. | 65 // Controller for this view. Weak reference. |
66 PasswordGenerationPopupController* controller_; | 66 PasswordGenerationPopupController* controller_; |
67 | 67 |
68 DISALLOW_COPY_AND_ASSIGN(PasswordGenerationPopupViewViews); | 68 DISALLOW_COPY_AND_ASSIGN(PasswordGenerationPopupViewViews); |
69 }; | 69 }; |
70 | 70 |
71 } // namespace autofill | 71 } // namespace autofill |
72 | 72 |
73 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_PASSWORD_GENERATION_POPUP_VIEW_VIEWS
_H_ | 73 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_PASSWORD_GENERATION_POPUP_VIEW_VIEWS
_H_ |
OLD | NEW |