| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_RENDERER_PASSWORD_GENERATION_MANAGER_H_ | 5 #ifndef COMPONENTS_AUTOFILL_RENDERER_PASSWORD_GENERATION_MANAGER_H_ |
| 6 #define COMPONENTS_AUTOFILL_RENDERER_PASSWORD_GENERATION_MANAGER_H_ | 6 #define COMPONENTS_AUTOFILL_RENDERER_PASSWORD_GENERATION_MANAGER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 virtual bool visibleByDefault() OVERRIDE; | 53 virtual bool visibleByDefault() OVERRIDE; |
| 54 virtual WebKit::WebCString imageNameForNormalState() OVERRIDE; | 54 virtual WebKit::WebCString imageNameForNormalState() OVERRIDE; |
| 55 virtual WebKit::WebCString imageNameForDisabledState() OVERRIDE; | 55 virtual WebKit::WebCString imageNameForDisabledState() OVERRIDE; |
| 56 virtual WebKit::WebCString imageNameForReadOnlyState() OVERRIDE; | 56 virtual WebKit::WebCString imageNameForReadOnlyState() OVERRIDE; |
| 57 virtual WebKit::WebCString imageNameForHoverState() OVERRIDE; | 57 virtual WebKit::WebCString imageNameForHoverState() OVERRIDE; |
| 58 virtual void handleClick(WebKit::WebInputElement& element) OVERRIDE; | 58 virtual void handleClick(WebKit::WebInputElement& element) OVERRIDE; |
| 59 virtual void willDetach(const WebKit::WebInputElement& element) OVERRIDE; | 59 virtual void willDetach(const WebKit::WebInputElement& element) OVERRIDE; |
| 60 | 60 |
| 61 // Message handlers. | 61 // Message handlers. |
| 62 void OnFormNotBlacklisted(const content::PasswordForm& form); | 62 void OnFormNotBlacklisted(const content::PasswordForm& form); |
| 63 void OnPasswordAccepted(const string16& password); | 63 void OnPasswordAccepted(const base::string16& password); |
| 64 void OnPasswordGenerationEnabled(bool enabled); | 64 void OnPasswordGenerationEnabled(bool enabled); |
| 65 | 65 |
| 66 // Helper function to decide whether we should show password generation icon. | 66 // Helper function to decide whether we should show password generation icon. |
| 67 void MaybeShowIcon(); | 67 void MaybeShowIcon(); |
| 68 | 68 |
| 69 content::RenderView* render_view_; | 69 content::RenderView* render_view_; |
| 70 | 70 |
| 71 // True if password generation is enabled for the profile associated | 71 // True if password generation is enabled for the profile associated |
| 72 // with this renderer. | 72 // with this renderer. |
| 73 bool enabled_; | 73 bool enabled_; |
| 74 | 74 |
| 75 // Stores the origin of the account creation form we detected. | 75 // Stores the origin of the account creation form we detected. |
| 76 GURL account_creation_form_origin_; | 76 GURL account_creation_form_origin_; |
| 77 | 77 |
| 78 // Stores the origins of the password forms confirmed not to be blacklisted | 78 // Stores the origins of the password forms confirmed not to be blacklisted |
| 79 // by the browser. A form can be blacklisted if a user chooses "never save | 79 // by the browser. A form can be blacklisted if a user chooses "never save |
| 80 // passwords for this site". | 80 // passwords for this site". |
| 81 std::vector<GURL> not_blacklisted_password_form_origins_; | 81 std::vector<GURL> not_blacklisted_password_form_origins_; |
| 82 | 82 |
| 83 std::vector<WebKit::WebInputElement> passwords_; | 83 std::vector<WebKit::WebInputElement> passwords_; |
| 84 | 84 |
| 85 DISALLOW_COPY_AND_ASSIGN(PasswordGenerationManager); | 85 DISALLOW_COPY_AND_ASSIGN(PasswordGenerationManager); |
| 86 }; | 86 }; |
| 87 | 87 |
| 88 } // namespace autofill | 88 } // namespace autofill |
| 89 | 89 |
| 90 #endif // COMPONENTS_AUTOFILL_RENDERER_PASSWORD_GENERATION_MANAGER_H_ | 90 #endif // COMPONENTS_AUTOFILL_RENDERER_PASSWORD_GENERATION_MANAGER_H_ |
| OLD | NEW |