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_AUTOFILL_PASSWORD_GENERATION_POPUP_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_PASSWORD_GENERATION_POPUP_VIEW_H_ |
6 #define CHROME_BROWSER_UI_AUTOFILL_PASSWORD_GENERATION_POPUP_VIEW_H_ | 6 #define CHROME_BROWSER_UI_AUTOFILL_PASSWORD_GENERATION_POPUP_VIEW_H_ |
7 | 7 |
8 #include "third_party/skia/include/core/SkColor.h" | 8 #include "third_party/skia/include/core/SkColor.h" |
9 | 9 |
10 namespace autofill { | 10 namespace autofill { |
11 | 11 |
12 class PasswordGenerationPopupController; | 12 class PasswordGenerationPopupController; |
13 | 13 |
14 // Interface for creating and controlling a platform dependent view. | 14 // Interface for creating and controlling a platform dependent view. |
15 class PasswordGenerationPopupView { | 15 class PasswordGenerationPopupView { |
16 public: | 16 public: |
17 // This is the amount of vertical whitespace that is left above and below the | 17 // Number of pixels added in between lines of the help section. |
18 // password when it is highlighted. | 18 static const int kHelpSectionAdditionalSpacing = 3; |
19 static const int kPasswordVerticalInset = 7; | |
20 | 19 |
21 // Display the popup. | 20 // Display the popup. |
22 virtual void Show() = 0; | 21 virtual void Show() = 0; |
23 | 22 |
24 // This will cause the popup to be deleted. | 23 // This will cause the popup to be deleted. |
25 virtual void Hide() = 0; | 24 virtual void Hide() = 0; |
26 | 25 |
27 // Updates layout information from the controller. | 26 // Updates layout information from the controller. |
28 virtual void UpdateBoundsAndRedrawPopup() = 0; | 27 virtual void UpdateBoundsAndRedrawPopup() = 0; |
29 | 28 |
30 // Called when the password selection state has changed. | 29 // Called when the password selection state has changed. |
31 virtual void PasswordSelectionUpdated() = 0; | 30 virtual void PasswordSelectionUpdated() = 0; |
32 | 31 |
33 // Note that PasswordGenerationPopupView owns itself, and will only be deleted | 32 // Note that PasswordGenerationPopupView owns itself, and will only be deleted |
34 // when Hide() is called. | 33 // when Hide() is called. |
35 static PasswordGenerationPopupView* Create( | 34 static PasswordGenerationPopupView* Create( |
36 PasswordGenerationPopupController* controller); | 35 PasswordGenerationPopupController* controller); |
37 | 36 |
38 static const SkColor kExplanatoryTextBackgroundColor; | 37 static const SkColor kExplanatoryTextBackgroundColor; |
39 static const SkColor kExplanatoryTextColor; | 38 static const SkColor kExplanatoryTextColor; |
40 static const SkColor kDividerColor; | 39 static const SkColor kDividerColor; |
41 static const SkColor kLinkColor; | 40 static const SkColor kLinkColor; |
42 }; | 41 }; |
43 | 42 |
44 } // namespace autofill | 43 } // namespace autofill |
45 | 44 |
46 #endif // CHROME_BROWSER_UI_AUTOFILL_PASSWORD_GENERATION_POPUP_VIEW_H_ | 45 #endif // CHROME_BROWSER_UI_AUTOFILL_PASSWORD_GENERATION_POPUP_VIEW_H_ |
OLD | NEW |