| 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/views/controls/styled_label_listener.h" | 10 #include "ui/views/controls/styled_label_listener.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 public PasswordGenerationPopupView, | 22 public PasswordGenerationPopupView, |
| 23 public views::StyledLabelListener { | 23 public views::StyledLabelListener { |
| 24 public: | 24 public: |
| 25 PasswordGenerationPopupViewViews( | 25 PasswordGenerationPopupViewViews( |
| 26 PasswordGenerationPopupController* controller, | 26 PasswordGenerationPopupController* controller, |
| 27 views::Widget* observing_widget); | 27 views::Widget* observing_widget); |
| 28 | 28 |
| 29 // PasswordGenerationPopupView implementation | 29 // PasswordGenerationPopupView implementation |
| 30 virtual void Show() OVERRIDE; | 30 virtual void Show() OVERRIDE; |
| 31 virtual void Hide() OVERRIDE; | 31 virtual void Hide() OVERRIDE; |
| 32 virtual int SetBoundsForWidth(int width) OVERRIDE; |
| 32 virtual void UpdateBoundsAndRedrawPopup() OVERRIDE; | 33 virtual void UpdateBoundsAndRedrawPopup() OVERRIDE; |
| 33 virtual void PasswordSelectionUpdated() OVERRIDE; | 34 virtual void PasswordSelectionUpdated() OVERRIDE; |
| 35 virtual bool IsPointInPasswordBounds(const gfx::Point& point) OVERRIDE; |
| 34 | 36 |
| 35 private: | 37 private: |
| 36 virtual ~PasswordGenerationPopupViewViews(); | 38 virtual ~PasswordGenerationPopupViewViews(); |
| 37 | 39 |
| 38 // Helper function to create |password_view_|. | 40 // Helper function to create |password_view_|. |
| 39 void CreatePasswordView(); | 41 void CreatePasswordView(); |
| 40 | 42 |
| 41 // views:Views implementation. | 43 // views:Views implementation. |
| 42 virtual void Layout() OVERRIDE; | 44 virtual void Layout() OVERRIDE; |
| 43 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 45 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
| 44 | 46 |
| 45 // views::StyledLabelListener implementation | 47 // views::StyledLabelListener implementation |
| 46 virtual void StyledLabelLinkClicked(const gfx::Range& range, | 48 virtual void StyledLabelLinkClicked(const gfx::Range& range, |
| 47 int event_flags) OVERRIDE; | 49 int event_flags) OVERRIDE; |
| 48 | 50 |
| 49 // Sub views. Used to change bounds when updating. Weak references. | 51 // Sub views. Used to change bounds when updating. Weak references. |
| 50 views::View* password_view_; | 52 views::View* password_view_; |
| 51 views::StyledLabel* help_label_; | 53 views::StyledLabel* help_label_; |
| 52 | 54 |
| 55 gfx::Rect divider_bounds_; |
| 56 |
| 53 // Controller for this view. Weak reference. | 57 // Controller for this view. Weak reference. |
| 54 PasswordGenerationPopupController* controller_; | 58 PasswordGenerationPopupController* controller_; |
| 55 | 59 |
| 56 DISALLOW_COPY_AND_ASSIGN(PasswordGenerationPopupViewViews); | 60 DISALLOW_COPY_AND_ASSIGN(PasswordGenerationPopupViewViews); |
| 57 }; | 61 }; |
| 58 | 62 |
| 59 } // namespace autofill | 63 } // namespace autofill |
| 60 | 64 |
| 61 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_PASSWORD_GENERATION_POPUP_VIEW_VIEWS
_H_ | 65 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_PASSWORD_GENERATION_POPUP_VIEW_VIEWS
_H_ |
| OLD | NEW |