| OLD | NEW |
| 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 COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_GENERATION_AGENT_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_GENERATION_AGENT_H_ |
| 6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_GENERATION_AGENT_H_ | 6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_GENERATION_AGENT_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 virtual bool ShouldAnalyzeDocument(const blink::WebDocument& document) const; | 42 virtual bool ShouldAnalyzeDocument(const blink::WebDocument& document) const; |
| 43 | 43 |
| 44 // RenderViewObserver: | 44 // RenderViewObserver: |
| 45 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 45 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 46 | 46 |
| 47 // Use to force enable during testing. | 47 // Use to force enable during testing. |
| 48 void set_enabled(bool enabled) { enabled_ = enabled; } | 48 void set_enabled(bool enabled) { enabled_ = enabled; } |
| 49 | 49 |
| 50 private: | 50 private: |
| 51 // RenderViewObserver: | 51 // RenderViewObserver: |
| 52 virtual void DidFinishDocumentLoad(blink::WebFrame* frame) OVERRIDE; | 52 virtual void DidFinishDocumentLoad(blink::WebLocalFrame* frame) OVERRIDE; |
| 53 virtual void DidFinishLoad(blink::WebFrame* frame) OVERRIDE; | 53 virtual void DidFinishLoad(blink::WebLocalFrame* frame) OVERRIDE; |
| 54 virtual void FocusedNodeChanged(const blink::WebNode& node) OVERRIDE; | 54 virtual void FocusedNodeChanged(const blink::WebNode& node) OVERRIDE; |
| 55 | 55 |
| 56 // Message handlers. | 56 // Message handlers. |
| 57 void OnFormNotBlacklisted(const PasswordForm& form); | 57 void OnFormNotBlacklisted(const PasswordForm& form); |
| 58 void OnPasswordAccepted(const base::string16& password); | 58 void OnPasswordAccepted(const base::string16& password); |
| 59 void OnAccountCreationFormsDetected( | 59 void OnAccountCreationFormsDetected( |
| 60 const std::vector<autofill::FormData>& forms); | 60 const std::vector<autofill::FormData>& forms); |
| 61 | 61 |
| 62 // Helper function to decide if |passwords_| contains password fields for | 62 // Helper function to decide if |passwords_| contains password fields for |
| 63 // an account creation form. Sets |generation_element_| to the field that | 63 // an account creation form. Sets |generation_element_| to the field that |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 | 104 |
| 105 // If this feature is enabled. Controlled by Finch. | 105 // If this feature is enabled. Controlled by Finch. |
| 106 bool enabled_; | 106 bool enabled_; |
| 107 | 107 |
| 108 DISALLOW_COPY_AND_ASSIGN(PasswordGenerationAgent); | 108 DISALLOW_COPY_AND_ASSIGN(PasswordGenerationAgent); |
| 109 }; | 109 }; |
| 110 | 110 |
| 111 } // namespace autofill | 111 } // namespace autofill |
| 112 | 112 |
| 113 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_GENERATION_AGENT_H_ | 113 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_GENERATION_AGENT_H_ |
| OLD | NEW |