| 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 CHROME_RENDERER_AUTOFILL_PASSWORD_AUTOFILL_MANAGER_H_ | 5 #ifndef CHROME_RENDERER_AUTOFILL_PASSWORD_AUTOFILL_MANAGER_H_ |
| 6 #define CHROME_RENDERER_AUTOFILL_PASSWORD_AUTOFILL_MANAGER_H_ | 6 #define CHROME_RENDERER_AUTOFILL_PASSWORD_AUTOFILL_MANAGER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 12 #include "chrome/common/password_form_fill_data.h" | 12 #include "chrome/common/password_form_fill_data.h" |
| 13 #include "chrome/renderer/page_click_listener.h" | 13 #include "chrome/renderer/page_click_listener.h" |
| 14 #include "content/public/renderer/render_view_observer.h" | 14 #include "content/public/renderer/render_view_observer.h" |
| 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h" | 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h" |
| 16 | 16 |
| 17 namespace WebKit { | 17 namespace WebKit { |
| 18 class WebInputElement; | 18 class WebInputElement; |
| 19 class WebKeyboardEvent; | 19 class WebKeyboardEvent; |
| 20 class WebView; |
| 20 } | 21 } |
| 21 | 22 |
| 22 namespace autofill { | 23 namespace autofill { |
| 23 | 24 |
| 24 // This class is responsible for filling password forms. | 25 // This class is responsible for filling password forms. |
| 25 // There is one PasswordAutofillManager per RenderView. | 26 // There is one PasswordAutofillManager per RenderView. |
| 26 class PasswordAutofillManager : public content::RenderViewObserver, | 27 class PasswordAutofillManager : public content::RenderViewObserver, |
| 27 public PageClickListener { | 28 public PageClickListener { |
| 28 public: | 29 public: |
| 29 explicit PasswordAutofillManager(content::RenderView* render_view); | 30 explicit PasswordAutofillManager(content::RenderView* render_view); |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 bool FindLoginInfo(const WebKit::WebNode& node, | 111 bool FindLoginInfo(const WebKit::WebNode& node, |
| 111 WebKit::WebInputElement* found_input, | 112 WebKit::WebInputElement* found_input, |
| 112 PasswordInfo* found_password); | 113 PasswordInfo* found_password); |
| 113 | 114 |
| 114 // The logins we have filled so far with their associated info. | 115 // The logins we have filled so far with their associated info. |
| 115 LoginToPasswordInfoMap login_to_password_info_; | 116 LoginToPasswordInfoMap login_to_password_info_; |
| 116 | 117 |
| 117 // Used to disable and hide the popup. | 118 // Used to disable and hide the popup. |
| 118 bool disable_popup_; | 119 bool disable_popup_; |
| 119 | 120 |
| 121 // Pointer to the WebView. Used to access page scale factor. |
| 122 WebKit::WebView* web_view_; |
| 123 |
| 120 base::WeakPtrFactory<PasswordAutofillManager> weak_ptr_factory_; | 124 base::WeakPtrFactory<PasswordAutofillManager> weak_ptr_factory_; |
| 121 | 125 |
| 122 DISALLOW_COPY_AND_ASSIGN(PasswordAutofillManager); | 126 DISALLOW_COPY_AND_ASSIGN(PasswordAutofillManager); |
| 123 }; | 127 }; |
| 124 | 128 |
| 125 } // namespace autofill | 129 } // namespace autofill |
| 126 | 130 |
| 127 #endif // CHROME_RENDERER_AUTOFILL_PASSWORD_AUTOFILL_MANAGER_H_ | 131 #endif // CHROME_RENDERER_AUTOFILL_PASSWORD_AUTOFILL_MANAGER_H_ |
| OLD | NEW |