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

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

Issue 671653002: Standardize usage of virtual/override/final in chrome/browser/ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
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_CONTROLLER_IMPL_H_ 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_PASSWORD_GENERATION_POPUP_CONTROLLER_IMPL_H_
6 #define CHROME_BROWSER_UI_AUTOFILL_PASSWORD_GENERATION_POPUP_CONTROLLER_IMPL_H_ 6 #define CHROME_BROWSER_UI_AUTOFILL_PASSWORD_GENERATION_POPUP_CONTROLLER_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // be notified of changes of the popup state. 48 // be notified of changes of the popup state.
49 static base::WeakPtr<PasswordGenerationPopupControllerImpl> GetOrCreate( 49 static base::WeakPtr<PasswordGenerationPopupControllerImpl> GetOrCreate(
50 base::WeakPtr<PasswordGenerationPopupControllerImpl> previous, 50 base::WeakPtr<PasswordGenerationPopupControllerImpl> previous,
51 const gfx::RectF& bounds, 51 const gfx::RectF& bounds,
52 const PasswordForm& form, 52 const PasswordForm& form,
53 int max_length, 53 int max_length,
54 password_manager::PasswordManager* password_manager, 54 password_manager::PasswordManager* password_manager,
55 PasswordGenerationPopupObserver* observer, 55 PasswordGenerationPopupObserver* observer,
56 content::WebContents* web_contents, 56 content::WebContents* web_contents,
57 gfx::NativeView container_view); 57 gfx::NativeView container_view);
58 virtual ~PasswordGenerationPopupControllerImpl(); 58 ~PasswordGenerationPopupControllerImpl() override;
59 59
60 // Create a PasswordGenerationPopupView if one doesn't already exist. 60 // Create a PasswordGenerationPopupView if one doesn't already exist.
61 // If |display_password| is true, a generated password is shown that can be 61 // If |display_password| is true, a generated password is shown that can be
62 // selected by the user. Otherwise just the text explaining generated 62 // selected by the user. Otherwise just the text explaining generated
63 // passwords is shown. Idempotent. 63 // passwords is shown. Idempotent.
64 void Show(bool display_password); 64 void Show(bool display_password);
65 65
66 // Hides the popup and destroys |this|. 66 // Hides the popup and destroys |this|.
67 void HideAndDestroy(); 67 void HideAndDestroy();
68 68
(...skipping 10 matching lines...) Expand all
79 password_manager::PasswordManager* password_manager, 79 password_manager::PasswordManager* password_manager,
80 PasswordGenerationPopupObserver* observer, 80 PasswordGenerationPopupObserver* observer,
81 content::WebContents* web_contents, 81 content::WebContents* web_contents,
82 gfx::NativeView container_view); 82 gfx::NativeView container_view);
83 83
84 // Handle to the popup. May be NULL if popup isn't showing. 84 // Handle to the popup. May be NULL if popup isn't showing.
85 PasswordGenerationPopupView* view_; 85 PasswordGenerationPopupView* view_;
86 86
87 private: 87 private:
88 // PasswordGenerationPopupController implementation: 88 // PasswordGenerationPopupController implementation:
89 virtual void Hide() override; 89 void Hide() override;
90 virtual void ViewDestroyed() override; 90 void ViewDestroyed() override;
91 virtual void SetSelectionAtPoint(const gfx::Point& point) override; 91 void SetSelectionAtPoint(const gfx::Point& point) override;
92 virtual bool AcceptSelectedLine() override; 92 bool AcceptSelectedLine() override;
93 virtual void SelectionCleared() override; 93 void SelectionCleared() override;
94 virtual void PasswordAccepted() override; 94 void PasswordAccepted() override;
95 virtual void OnSavedPasswordsLinkClicked() override; 95 void OnSavedPasswordsLinkClicked() override;
96 virtual int GetMinimumWidth() override; 96 int GetMinimumWidth() override;
97 virtual gfx::NativeView container_view() override; 97 gfx::NativeView container_view() override;
98 virtual const gfx::Rect& popup_bounds() const override; 98 const gfx::Rect& popup_bounds() const override;
99 virtual const gfx::RectF& element_bounds() const override; 99 const gfx::RectF& element_bounds() const override;
100 virtual bool IsRTL() const override; 100 bool IsRTL() const override;
101 virtual bool display_password() const override; 101 bool display_password() const override;
102 virtual bool password_selected() const override; 102 bool password_selected() const override;
103 virtual base::string16 password() const override; 103 base::string16 password() const override;
104 virtual base::string16 SuggestedText() override; 104 base::string16 SuggestedText() override;
105 virtual const base::string16& HelpText() override; 105 const base::string16& HelpText() override;
106 virtual const gfx::Range& HelpTextLinkRange() override; 106 const gfx::Range& HelpTextLinkRange() override;
107 107
108 base::WeakPtr<PasswordGenerationPopupControllerImpl> GetWeakPtr(); 108 base::WeakPtr<PasswordGenerationPopupControllerImpl> GetWeakPtr();
109 109
110 bool HandleKeyPressEvent(const content::NativeWebKeyboardEvent& event); 110 bool HandleKeyPressEvent(const content::NativeWebKeyboardEvent& event);
111 111
112 // Set if the password is currently selected. 112 // Set if the password is currently selected.
113 void PasswordSelected(bool selected); 113 void PasswordSelected(bool selected);
114 114
115 // Accept password if it's selected. 115 // Accept password if it's selected.
116 bool PossiblyAcceptPassword(); 116 bool PossiblyAcceptPassword();
(...skipping 29 matching lines...) Expand all
146 gfx::Rect popup_bounds_; 146 gfx::Rect popup_bounds_;
147 147
148 base::WeakPtrFactory<PasswordGenerationPopupControllerImpl> weak_ptr_factory_; 148 base::WeakPtrFactory<PasswordGenerationPopupControllerImpl> weak_ptr_factory_;
149 149
150 DISALLOW_COPY_AND_ASSIGN(PasswordGenerationPopupControllerImpl); 150 DISALLOW_COPY_AND_ASSIGN(PasswordGenerationPopupControllerImpl);
151 }; 151 };
152 152
153 } // namespace autofill 153 } // namespace autofill
154 154
155 #endif // CHROME_BROWSER_UI_AUTOFILL_PASSWORD_GENERATION_POPUP_CONTROLLER_IMPL_ H_ 155 #endif // CHROME_BROWSER_UI_AUTOFILL_PASSWORD_GENERATION_POPUP_CONTROLLER_IMPL_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698