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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_AUTOFILL_PASSWORD_GENERATION_POPUP_VIEW_H_
6 #define CHROME_BROWSER_UI_AUTOFILL_PASSWORD_GENERATION_POPUP_VIEW_H_
10 class PasswordGenerationPopupController;
12 // Interface for creating and controlling a platform dependent view.
13 class PasswordGenerationPopupView {
15 // This is the amount of vertical whitespace that is left above and below the
16 // password when it is highlighted.
17 static const int kPasswordVerticalInset = 7;
20 virtual void Show() = 0;
22 // This will cause the popup to be deleted.
23 virtual void Hide() = 0;
25 // Updates layout information from the controller.
26 virtual void UpdateBoundsAndRedrawPopup() = 0;
28 // Called when the password selection state has changed.
29 virtual void PasswordSelectionUpdated() = 0;
31 // Note that PasswordGenerationPopupView owns itself, and will only be deleted
32 // when Hide() is called.
33 static PasswordGenerationPopupView* Create(
34 PasswordGenerationPopupController* controller);
37 } // namespace autofill
39 #endif // CHROME_BROWSER_UI_AUTOFILL_PASSWORD_GENERATION_POPUP_VIEW_H_