password_generation_popup_controller.h revision 116680a4aac90f2aa7413d9095a592090648e557
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. 4 5#ifndef CHROME_BROWSER_UI_AUTOFILL_PASSWORD_GENERATION_POPUP_CONTROLLER_H_ 6#define CHROME_BROWSER_UI_AUTOFILL_PASSWORD_GENERATION_POPUP_CONTROLLER_H_ 7 8#include "base/strings/string16.h" 9#include "chrome/browser/ui/autofill/autofill_popup_view_delegate.h" 10 11namespace gfx { 12class Range; 13} 14 15namespace autofill { 16 17class PasswordGenerationPopupController : public AutofillPopupViewDelegate { 18 public: 19 // Space above and below help section. 20 static const int kHelpVerticalPadding = 15; 21 22 // Spacing between the border of the popup and any text. 23 static const int kHorizontalPadding = 10; 24 25 // Called by the view when the saved passwords link is clicked. 26 virtual void OnSavedPasswordsLinkClicked() = 0; 27 28 // Return the minimum allowable width for the popup. 29 virtual int GetMinimumWidth() = 0; 30 31 // Accessors 32 virtual bool display_password() const = 0; 33 virtual bool password_selected() const = 0; 34 virtual base::string16 password() const = 0; 35 36 // Translated strings 37 virtual base::string16 SuggestedText() = 0; 38 virtual const base::string16& HelpText() = 0; 39 virtual const gfx::Range& HelpTextLinkRange() = 0; 40 41 protected: 42 virtual ~PasswordGenerationPopupController() {} 43}; 44 45} // namespace autofill 46 47#endif // CHROME_BROWSER_UI_AUTOFILL_PASSWORD_GENERATION_POPUP_CONTROLLER_H_ 48