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

Side by Side Diff: components/password_manager/core/browser/password_generation_manager.h

Issue 707173004: Refactor Autofill for out of process iframes (OOPIF). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_GENERATION_MANAGER_H_ 5 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_GENERATION_MANAGER_H_
6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_GENERATION_MANAGER_H_ 6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_GENERATION_MANAGER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 15 matching lines...) Expand all
26 // NOTE: At the moment, the creation of the renderer PasswordGenerationManager 26 // NOTE: At the moment, the creation of the renderer PasswordGenerationManager
27 // is controlled by a switch (--enable-password-generation) so this feature will 27 // is controlled by a switch (--enable-password-generation) so this feature will
28 // not be enabled regardless of the above criteria without the switch being 28 // not be enabled regardless of the above criteria without the switch being
29 // present. 29 // present.
30 // 30 //
31 // This class is used to determine what forms we should offer to generate 31 // This class is used to determine what forms we should offer to generate
32 // passwords for and manages the popup which is created if the user chooses to 32 // passwords for and manages the popup which is created if the user chooses to
33 // generate a password. 33 // generate a password.
34 class PasswordGenerationManager { 34 class PasswordGenerationManager {
35 public: 35 public:
36 explicit PasswordGenerationManager(PasswordManagerClient* client); 36 PasswordGenerationManager(PasswordManagerClient* client,
37 PasswordManagerDriver* driver);
37 virtual ~PasswordGenerationManager(); 38 virtual ~PasswordGenerationManager();
38 39
39 // Detect account creation forms from forms with autofill type annotated. 40 // Detect account creation forms from forms with autofill type annotated.
40 // Will send a message to the renderer if we find a correctly annotated form 41 // Will send a message to the renderer if we find a correctly annotated form
41 // and the feature is enabled. 42 // and the feature is enabled.
42 void DetectAccountCreationForms( 43 void DetectAccountCreationForms(
43 const std::vector<autofill::FormStructure*>& forms); 44 const std::vector<autofill::FormStructure*>& forms);
44 45
45 private: 46 private:
46 friend class PasswordGenerationManagerTest; 47 friend class PasswordGenerationManagerTest;
47 48
48 // Determines current state of password generation 49 // Determines current state of password generation
49 bool IsGenerationEnabled() const; 50 bool IsGenerationEnabled() const;
50 51
51 // The PasswordManagerClient instance associated with this instance. Must 52 // The PasswordManagerClient instance associated with this instance. Must
52 // outlive this instance. 53 // outlive this instance.
53 PasswordManagerClient* client_; 54 PasswordManagerClient* client_;
54 55
55 // The PasswordManagerDriver instance associated with this instance. Must 56 // The PasswordManagerDriver instance associated with this instance. Must
56 // outlive this instance. 57 // outlive this instance.
57 PasswordManagerDriver* driver_; 58 PasswordManagerDriver* driver_;
58 59
59 DISALLOW_COPY_AND_ASSIGN(PasswordGenerationManager); 60 DISALLOW_COPY_AND_ASSIGN(PasswordGenerationManager);
60 }; 61 };
61 62
62 } // namespace password_manager 63 } // namespace password_manager
63 64
64 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_GENERATION_MANAGER_ H_ 65 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_GENERATION_MANAGER_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698