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

Side by Side Diff: chrome/browser/password_manager/password_generation_manager.h

Issue 23742004: Move PasswordForm from //content to //autofill. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_password_form_conversion_utils
Patch Set: Rebase Created 7 years, 3 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_PASSWORD_MANAGER_PASSWORD_GENERATION_MANAGER_H_ 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_GENERATION_MANAGER_H_
6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_GENERATION_MANAGER_H_ 6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_GENERATION_MANAGER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
11 #include "base/prefs/pref_change_registrar.h" 11 #include "base/prefs/pref_change_registrar.h"
12 #include "chrome/browser/sync/profile_sync_service_observer.h" 12 #include "chrome/browser/sync/profile_sync_service_observer.h"
13 #include "content/public/browser/web_contents_observer.h" 13 #include "content/public/browser/web_contents_observer.h"
14 #include "content/public/browser/web_contents_user_data.h" 14 #include "content/public/browser/web_contents_user_data.h"
15 15
16 namespace autofill { 16 namespace autofill {
17 struct FormData; 17 struct FormData;
18 class FormStructure; 18 class FormStructure;
19 class PasswordGenerator; 19 class PasswordGenerator;
20 }
21
22 namespace content {
23 struct PasswordForm; 20 struct PasswordForm;
24 } 21 }
25 22
26 namespace user_prefs { 23 namespace user_prefs {
27 class PrefRegistrySyncable; 24 class PrefRegistrySyncable;
28 } 25 }
29 26
30 // Per-tab manager for password generation. Will enable this feature only if 27 // Per-tab manager for password generation. Will enable this feature only if
31 // 28 //
32 // - Password manager is enabled 29 // - Password manager is enabled
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 86
90 virtual void SendAccountCreationFormsToRenderer( 87 virtual void SendAccountCreationFormsToRenderer(
91 content::RenderViewHost* host, 88 content::RenderViewHost* host,
92 const std::vector<autofill::FormData>& forms); 89 const std::vector<autofill::FormData>& forms);
93 90
94 // Causes the password generation bubble UI to be shown for the specified 91 // Causes the password generation bubble UI to be shown for the specified
95 // form. The popup will be anchored at |icon_bounds|. The generated 92 // form. The popup will be anchored at |icon_bounds|. The generated
96 // password will be no longer than |max_length|. 93 // password will be no longer than |max_length|.
97 void OnShowPasswordGenerationPopup(const gfx::Rect& icon_bounds, 94 void OnShowPasswordGenerationPopup(const gfx::Rect& icon_bounds,
98 int max_length, 95 int max_length,
99 const content::PasswordForm& form); 96 const autofill::PasswordForm& form);
100 97
101 // Whether password generation is enabled. 98 // Whether password generation is enabled.
102 bool enabled_; 99 bool enabled_;
103 100
104 // Listens for changes to the state of the password generation pref. 101 // Listens for changes to the state of the password generation pref.
105 PrefChangeRegistrar registrar_; 102 PrefChangeRegistrar registrar_;
106 103
107 // For vending a weak_ptr for |registrar_|. 104 // For vending a weak_ptr for |registrar_|.
108 base::WeakPtrFactory<PasswordGenerationManager> weak_factory_; 105 base::WeakPtrFactory<PasswordGenerationManager> weak_factory_;
109 106
110 // Controls how passwords are generated. 107 // Controls how passwords are generated.
111 scoped_ptr<autofill::PasswordGenerator> password_generator_; 108 scoped_ptr<autofill::PasswordGenerator> password_generator_;
112 109
113 DISALLOW_COPY_AND_ASSIGN(PasswordGenerationManager); 110 DISALLOW_COPY_AND_ASSIGN(PasswordGenerationManager);
114 }; 111 };
115 112
116 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_GENERATION_MANAGER_H_ 113 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_GENERATION_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698