| 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> |
| 11 | 11 |
| 12 #include "components/autofill/common/autofill_export.h" |
| 12 #include "content/public/renderer/render_view_observer.h" | 13 #include "content/public/renderer/render_view_observer.h" |
| 13 #include "googleurl/src/gurl.h" | 14 #include "googleurl/src/gurl.h" |
| 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h" | 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h" |
| 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextFieldDecorator
Client.h" | 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextFieldDecorator
Client.h" |
| 16 | 17 |
| 17 namespace WebKit { | 18 namespace WebKit { |
| 18 class WebCString; | 19 class WebCString; |
| 19 class WebDocument; | 20 class WebDocument; |
| 20 } | 21 } |
| 21 | 22 |
| 22 namespace content { | 23 namespace content { |
| 23 struct PasswordForm; | 24 struct PasswordForm; |
| 24 } | 25 } |
| 25 | 26 |
| 26 namespace autofill { | 27 namespace autofill { |
| 27 | 28 |
| 28 // This class is responsible for controlling communication for password | 29 // This class is responsible for controlling communication for password |
| 29 // generation between the browser (which shows the popup and generates | 30 // generation between the browser (which shows the popup and generates |
| 30 // passwords) and WebKit (shows the generation icon in the password field). | 31 // passwords) and WebKit (shows the generation icon in the password field). |
| 31 class PasswordGenerationManager : public content::RenderViewObserver, | 32 class AUTOFILL_EXPORT PasswordGenerationManager |
| 32 public WebKit::WebTextFieldDecoratorClient { | 33 : public content::RenderViewObserver, |
| 34 NON_EXPORTED_BASE(public WebKit::WebTextFieldDecoratorClient) { |
| 33 public: | 35 public: |
| 34 explicit PasswordGenerationManager(content::RenderView* render_view); | 36 explicit PasswordGenerationManager(content::RenderView* render_view); |
| 35 virtual ~PasswordGenerationManager(); | 37 virtual ~PasswordGenerationManager(); |
| 36 | 38 |
| 37 protected: | 39 protected: |
| 38 // Returns true if this document is one that we should consider analyzing. | 40 // Returns true if this document is one that we should consider analyzing. |
| 39 // Virtual so that it can be overriden during testing. | 41 // Virtual so that it can be overriden during testing. |
| 40 virtual bool ShouldAnalyzeDocument(const WebKit::WebDocument& document) const; | 42 virtual bool ShouldAnalyzeDocument(const WebKit::WebDocument& document) const; |
| 41 | 43 |
| 42 // RenderViewObserver: | 44 // RenderViewObserver: |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 std::vector<GURL> not_blacklisted_password_form_origins_; | 83 std::vector<GURL> not_blacklisted_password_form_origins_; |
| 82 | 84 |
| 83 std::vector<WebKit::WebInputElement> passwords_; | 85 std::vector<WebKit::WebInputElement> passwords_; |
| 84 | 86 |
| 85 DISALLOW_COPY_AND_ASSIGN(PasswordGenerationManager); | 87 DISALLOW_COPY_AND_ASSIGN(PasswordGenerationManager); |
| 86 }; | 88 }; |
| 87 | 89 |
| 88 } // namespace autofill | 90 } // namespace autofill |
| 89 | 91 |
| 90 #endif // COMPONENTS_AUTOFILL_RENDERER_PASSWORD_GENERATION_MANAGER_H_ | 92 #endif // COMPONENTS_AUTOFILL_RENDERER_PASSWORD_GENERATION_MANAGER_H_ |
| OLD | NEW |