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

Side by Side Diff: chrome/browser/ui/autofill/password_generation_popup_view.h

Issue 267183002: Password manager: Implement password generation UI for Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More implementation Created 6 years, 7 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_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"
9
8 namespace autofill { 10 namespace autofill {
9 11
10 class PasswordGenerationPopupController; 12 class PasswordGenerationPopupController;
11 13
12 // Interface for creating and controlling a platform dependent view. 14 // Interface for creating and controlling a platform dependent view.
13 class PasswordGenerationPopupView { 15 class PasswordGenerationPopupView {
14 public: 16 public:
15 // This is the amount of vertical whitespace that is left above and below the 17 // This is the amount of vertical whitespace that is left above and below the
16 // password when it is highlighted. 18 // password when it is highlighted.
17 static const int kPasswordVerticalInset = 7; 19 static const int kPasswordVerticalInset = 7;
18 20
19 // Display the popup. 21 // Display the popup.
20 virtual void Show() = 0; 22 virtual void Show() = 0;
21 23
22 // This will cause the popup to be deleted. 24 // This will cause the popup to be deleted.
23 virtual void Hide() = 0; 25 virtual void Hide() = 0;
24 26
25 // Updates layout information from the controller. 27 // Updates layout information from the controller.
26 virtual void UpdateBoundsAndRedrawPopup() = 0; 28 virtual void UpdateBoundsAndRedrawPopup() = 0;
27 29
28 // Called when the password selection state has changed. 30 // Called when the password selection state has changed.
29 virtual void PasswordSelectionUpdated() = 0; 31 virtual void PasswordSelectionUpdated() = 0;
30 32
31 // Note that PasswordGenerationPopupView owns itself, and will only be deleted 33 // Note that PasswordGenerationPopupView owns itself, and will only be deleted
32 // when Hide() is called. 34 // when Hide() is called.
33 static PasswordGenerationPopupView* Create( 35 static PasswordGenerationPopupView* Create(
34 PasswordGenerationPopupController* controller); 36 PasswordGenerationPopupController* controller);
37
38 static SkColor GetExplanatoryTextBackgroundColor();
39 static SkColor GetExplanatoryTextColor();
40 static SkColor GetDividerColor();
Evan Stade 2014/05/08 17:50:29 why are these functions instead of just constants?
Patrick Dubroy 2014/05/08 20:37:30 Because they require static initializers, and AFAI
Evan Stade 2014/05/08 20:52:41 SkColor is POD, so static initializers are OK.
Patrick Dubroy 2014/05/09 12:44:27 Done.
41 static SkColor GetLinkColor();
35 }; 42 };
36 43
37 } // namespace autofill 44 } // namespace autofill
38 45
39 #endif // CHROME_BROWSER_UI_AUTOFILL_PASSWORD_GENERATION_POPUP_VIEW_H_ 46 #endif // CHROME_BROWSER_UI_AUTOFILL_PASSWORD_GENERATION_POPUP_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698